RE: Single Sign-On User Credentials Question
- From: Trevor Conn <TrevorConn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 08:01:02 -0700
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
- Follow-Ups:
- RE: Single Sign-On User Credentials Question
- From: cwogle
- RE: Single Sign-On User Credentials Question
- References:
- RE: Single Sign-On User Credentials Question
- From: cwogle
- RE: Single Sign-On User Credentials Question
- Prev by Date: Re: Upgrading to licensed version of SP
- Next by Date: RE: stsadm.exe
- Previous by thread: RE: Single Sign-On User Credentials Question
- Next by thread: RE: Single Sign-On User Credentials Question
- Index(es):
Relevant Pages
|
Loading