Re: Going from anonymous security to Windows Security in an ASP.NET application



Hello,

the Iframe is populated on the client, not on the server. Therefore, any
impersonation, which takes place on the server has no effect on page loaded
in an IFrame.

Internet Explorer does have a setting regarding windows authentication -
it's buried in the security settings for the
internet/intranet/trusted/restricted sites. If you set this to "Automatic
logon with current username and password", the user won't have to identify
themselves each time.

No other solution here, I'm afraid.

Greetings,
Henning Krause


"Michael Randrup" <michael_randrup@xxxxxxxxxxx> wrote in message
news:O8SROCcUGHA.5148@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have the following problem:

1) We have to validate users on an anonymous/public-website using a custom
login page.

2) From this login page we redirect them to an extranet site, which shows
them sharepoint information, etc. e.g. from this point on their web
requests should be performed with their impersonated identities not as
anonymous users. The extranet sites uses Windows Integrated Security,
while the "main site" uses anonymous logins.

For them to use the sharepoint functionality we need to impersonate a
windows user that have the correct access to sharepoint. I have gotten so
far as to do the impersonation:

imp = New ImpersonationWrapper

imp.ImpersonateUser("username", "password", "domain")

Me.Context.User = New
System.Security.Principal.WindowsPrincipal(imp.NewId)Me.Cache.Add("W",
Me.Context.User, Nothing, DateTime.MaxValue, New TimeSpan(0, 10, 0),
CacheItemPriority.High, Nothing)


This sets the request context to the correct windows user, using a small
wrapper class around the Win32 LogonUser() API. I can now cache the
IPrincipal and set the context in each form_load() from this point on:

Me.Context.User = CType(Me.Cache("W"), IPrincipal)

My problem is that when I, for example, load the sharepoint page in an
IFRAME on the page, it is not using my impersonated user because the
sharepoint page is located in another web application or something?!?!

Do any of you have a good approach for doing this?!

Thanks in advance!

Michael



.



Relevant Pages

  • Re: User Impersonate error
    ... > the sharepoint SDK under 'Handling document library events'. ... > property is still set to the user before the impersonation occured? ... After playing around with sharepoint permissions and masking I ... To get this working I initially placed a full rights mask on the whole ...
    (microsoft.public.sharepoint.portalserver.development)
  • RE: Security issue while creating a Personal View programmatically
    ... For an easy approqach to impersonation, ... Microsoft FrontPage MVP ... > creates a personal view through sharepoint then this ... > public static string GetSearchView ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Going from anonymous security to Windows Security in an ASP.NET application
    ... "integrate" a public website, with a Windows Authenticated website, where we ... impersonation, which takes place on the server has no effect on page ... them sharepoint information, etc. e.g. from this point on their web ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Get a list of all top level WSS sites in SPS?
    ... you'll have to do extended impersonation as you're going into an area of the object model that regular impersonation can't do. ... I agree SharePoint navigation can be improved but it'll never satisfy everyone's needs. ... level WSS or Team Sites. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Web Part development pops up a logon screen and gives no acces
    ... account (and other developers acct). ... > and then use impersonation to "switch" them to a regular sharepoint ...
    (microsoft.public.sharepoint.portalserver.development)