RE: Single Sign-On User Credentials Question



Chris -- Thanks for the response. I've gotten a little bit further -- at
least I know where the error is coming from and what the real problem is.

Referring back to the code sample from the technet article, you can see that
in the catch block for the SingleSignonException there's a call to:
SingleSignonLocator.GetCredentialEntryURL(appName)

This is where the problem actually is. This call is failing and throwing the
following error:

System.NullReferenceException: Object reference not set to an instance of an
object.
at
Microsoft.SharePoint.Portal.WebControls.SiteInfo.GetSiteInfoCacheKey(PortalContext ctx)
at Microsoft.SharePoint.Portal.WebControls.SiteInfo.a(PortalContext A_0)
at Microsoft.SharePoint.Portal.WebControls.SiteInfo.a(PortalContext A_0,
Boolean A_1)
at Microsoft.SharePoint.Portal.WebControls.SiteInfo.GetSiteInfo()
at Microsoft.SharePoint.Portal.SingleSignonLocator.a(UInt16 A_0)
at
Microsoft.SharePoint.Portal.SingleSignonLocator.GetCredentialEntryUrl(String
strApplication, UInt16 sslPort)
at
Microsoft.SharePoint.Portal.SingleSignonLocator.GetCredentialEntryUrl(String
strApplication)
at WebPartLibrary.InfoPanel.CheckCredentialsDEBUG() in
c:\projects\webpartlibrary\infopanel\infopanel.cs:line 97

This seems to indicate that it can't find the login URL for my application.
I don't believe this is something I have to set up. From everything I've read
the login form is generated by SharePoint itself. So anyway, this is where
I'm stuck now.

Thanks for any help,
Trevor

"cwogle" wrote:

Trevor,

I created a single signon web part starting from the same code sample you
did. Mine sends the user to the correct login page when they click the "Click
here..." link. My thoughts...

1. The sample uses "SampleApp" in the call to GetCredentials, but uses
"MyIndividualApplicationID" in the call to GetCredentialEntryUrl. I don't
know why. My code uses the Enterprise Application name (or is that ID?) in
both places.

2. I had problems getting the sample code to work when it was inside
RenderWebpart() (as the example is). I moved the code to the OnLoad() event
of a dropdown list in the web part (in my case, the dropdown list is
populated with data from an external database that requires a separate login,
hence the single signon). I don't know why this made a difference. By moving
the code out of RenderWebpart(), I could no longer use "writer" and had to
add an error message string to the web part which gets enabled if an error is
detected.

3. I get the same error message when an unhandled exception occurrs. It
sounds like your code should catch any problem in GetCredentials. Is it
possible you are catching the exception but somehow rethrowing it inside the
catch block? Can you step through the code to find out exactly who is
throwing the exception?

Regards,
Chris
.



Relevant Pages

  • Forms Authentication with Active Directory, login control crashes
    ... using the login control that came with V.S. 2005. ... catch the exception so that I can display a friendly and helpful message to ... username, String password) +221 ... System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) ...
    (microsoft.public.dotnet.security)
  • Re: The IListSource does not contain any data sources.
    ... You said that things break after you try to login, ... The IListSource does not contain any data sources. ... Exception Details: System.Web.HttpException: The IListSource does ... be identified using the exception stack trace below. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Login Control / Forms Authentication with ActiveDirectoryMembersh
    ... normal office network login accounts, which existss in our Active Directory ... username and password, and if an incorrect username was entered, the login ... the application is throwing an exception (please see the server ... System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: website work on localhost but not on the server
    ... Exception Details: System.Data.SqlClient.SqlException: Login failed ... Not associated with a trusted SQL Server ...
    (microsoft.public.dotnet.framework.aspnet)

Loading