Mi je potrebno da se pozove na "CreateSubscription" method on an SSRS web service that is hosted in an FBA managed MOSS environment from a custom web part. We kept getting variations of:
- 401: Nije ovlaštena
- Objekt Moved
"Objekt preselio" Poruka je najzanimljivije jer je rekao da "objekt" (naš SSRS usluga) je "preselio" to login.aspx. This clearly meant we had some kind of authentication problem.
Na kraju sam shvatila da sam imala označili blogu by Robert Garret that described how to invoke a general purpose WSS/MOSS web service living inside an FBA environment. Note that I can’t link directly to the article (od 06/09/08) because it wants to authenticate. The link I provide brings you to an "all posts" view and you can locate the specific article by searching for "Accessing MOSS Web Services using Forms Based Authentication".
Evo kod koji je radio za nas:
ReportingService2006 rs = nula; // Dokazati Provjera auth = novi Ovjera(); ako (result.ErrorCode == LoginErrorCode.NoError) pokušati { rs.CreateSubscription(izvijestiti, extSettings, Opis, eventType, matchData, parameters1); } ulov (Iznimka ex) { Console.WriteLine(ex.Message.ToString()); } |
Ja interpretirati stvari raditi kao što je to:
- Naša web-dio treba dial-up uslugu provjere autentičnosti i reći, "Hey, Tony, to sam ja!".
- Autentifikacije usluga odgovora rekavši, "Hey, I know you. How are the kids? Here’s a token."
- Zovemo se SSR uslugu i reći, "Tony sent me, evo token."
</kraj>