Re: Web Part development pops up a logon screen and gives no acces
- From: "LC" <LC@xxxxxxxxxxx>
- Date: Fri, 2 Dec 2005 11:02:10 +0800
I get exactly the same thing as mr. walker. my webpart runs ok in my
account (and other developers acct). but when normal users run it, it popup
a log on screen. I think there is nothing to do with the code, as I already
commented out all the code and recompile, users still get the prompt. I
already deployed it to the GAC and tried to put it in inetpub\iportal\bin,
etc. i also tried to grant permission to related folders...still no luck.
Did you fix it and any idea?
"jgullickson" <jgullickson@xxxxxxxxxxxxxxxxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:4B15E323-4881-43E4-B802-EF3AE427B7D7@xxxxxxxxxxxxxxxx
> Erik, I'm working on a simular problem and I think there is more involved
> than just impersonation.
>
> I have a web part that will transform the anonymous user into an
> authenticated user based on an external authentication mechanism. The
> idea
> is that the user arrives at the site as an anonymous user, we validate
> them
> and then use impersonation to "switch" them to a regular sharepoint
> account.
>
> Here's the problem: the impersonation happens properly, and we can verify
> this by looking at the "WindowsIdentity.GetCurrent().Name", however when
> we
> examine "Context.User.Identity.Name", it returns the original user.
>
> For example, if I login as "Jason", and the impersonation tries to turn me
> into "John", WindowsIdentity.GetCurrent().Name returns "John", but
> Context.User.Identity.Name still returns "Jason". Since SharePoint still
> thinks I'm "Jason", I can't get at the resources that are assigned to
> "John".
>
> I've read a few different articles that say SharePoint only examines the
> HTTP context when you first hit the site, and that's why it doesn't change
> when I perform the impersonation, but there must be some way to tell
> SharePoint to update this (otherwise how would the "Login" button work,
> switching you from anonymous to an authenticated user?).
>
> I have seen some examples that have you create a second AppDomain, while
> running in the context of the impersonated user, but it seems like alot of
> trouble for something that should be simple...
>
> Any thoughts are appreciated!
>
> "Erik Jensen" wrote:
>
>> I would probably implement impersonation and impersonate a sharepoint
>> admin
>> account for this kind of thing.
>>
>> there are many good articles out there. basically you create a new
>> WindowsIdentity using stored (and secured ;) credentials.. do some
>> operations, then .Undo the .Impersonate used to programatically up the
>> permissions of the request being done.
>>
>> I'd google on sharepoint impersonation. and in particular the string
>> "IsUserInRole"
>>
>> you'll get good articles.
>>
>> "mr.walker" wrote:
>>
>> > I am developing a webpart rendering data from the rootweb and down.
>> > When I am
>> > working on the development server (Virtual Server Win2k3 and SPS2k3Sp1)
>> > adding the web part it works like a clock.
>> > Trying to test it on a colleagues account, he gets a log on screen and
>> > then
>> > access denied.
>> > He has been added to the site - no good
>> > He has been added to the root site - no good
>> > He is now administrator on the SPS - still no good
>> >
>> > How come it works for me (also admin on the server) but not for anyone
>> > else?
.
- Prev by Date: Webpart prompts for password?
- Next by Date: RE: Calculated Field using Filename in Document Share
- Previous by thread: Webpart prompts for password?
- Next by thread: Asp.Net 2.0 WebParts and SharePoint
- Index(es):