Invoking Seirbhísí SSRS Gréasáin Ó SSU / CAONAIGH i Comhshaoil ​​FBA

Is gá dúinn a agairt an 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: Nach n-údaraítear
  • Cuspóir athraíodh a ionad

An réad "ar athraíodh a ionad" teachtaireacht a bhí an chuid is mó suimiúil toisc go raibh sé ag rá go bhfuil an rud "" (ár seirbhís SSRS) Bhí "ar athraíodh a ionad" to login.aspx. This clearly meant we had some kind of authentication problem.

Thuig mé sa deireadh go raibh mé bookmarked ar iontráil bhlag 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 (mar ar 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".

Seo an cód a d'oibrigh le linn:

ReportingService2006 rs = náid; 
// Fhíordheimhniú Fíordheimhniú údarás = nua Fíordheimhniú(); 
auth.Url = "http://URL / _vti_bin / Authentication.asmx";
auth.CookieContainer =
nua CookieContainer();
LoginResult toradh = auth.Login("userid", "password");
más rud é (result.ErrorCode == LoginErrorCode.NoError) 
{
// Uimh earráid, mar sin a fháil ar an fianáin.
Fianáin CookieCollection = auth.CookieContainer.GetCookies(nua URI(auth.Url));
AuthCookie Cookie = fianáin[result.CookieName];
rs =
nua ReportingService2006();
rs.Url =
"http://server/_vti_bin/ReportServer/ReportService2006.asmx";
rs.CookieContainer =
nua CookieContainer();
rs.CookieContainer.Add(authCookie);
}
iarracht
{
  rs.CreateSubscription(tuarascáil, extSettings, desc, eventType, matchData, parameters1);
}
ghabháil (Ex Eisceacht)
{
  Console.WriteLine(ex.Message.ToString());
}

Mé a léirmhíniú rudaí a bheith ag obair mar seo:

  • Riachtanais ár gcuid gréasáin a dhiailiú suas an tseirbhís fíordheimhnithe agus a rá, "Hey, Tony, tá sé dom!".
  • Freagraí seirbhíse Fíordheimhniú ag rá, "Hey, I know you. How are the kids? Here’s a token."
  • Iarraimid suas an tseirbhís SSRS agus a rá, "Tony sent me, anseo tá an chomhartha."

</deireadh>

Liostáil le mo bhlag.

Leave a Reply

Ní thabharfar do sheoladh r-phoist a fhoilsiú. Réimsí riachtanacha atá marcáilte *