Impersonation and clicking links



Hi,

I have a web page (site.com\page1.asp) which contains a link to a document
on the same server (site.com\Restricted\doc1.pdf). I want to ensure that the
only way people can access the file is by clicking the link, and not by
pasting the URL into the browser. My idea was to use impersonation on
page1.asp and to restrict the folder "Restricted" to only allow access to
the user I define in the web.config file.

My problem is that I need anyone to be able to see page1.asp, and therefore
allowed anonymous access to it. I stuck a couple of labels on page1.asp just
to see what's going on, and I see that the User.Identity is null, and that
the Principal.WindowsIdentity is "SERVER\username" as specified in my
web.config.

When I click the link on the page, I still get prompted for a username and
password to access doc1.pdf. I am guessing this is because User.Identity is
null, but if that is the case, what is the point of impersonation? If I put
in the username and password I can access doc1.pdf, so I know it's not a
permissions issue.

If anyone could offer me some insight I would appreciate it.

Thanks


.



Relevant Pages

  • Re: SQL Integrated Security in .NET1.1
    ... unless you have a domain user called "username" you have your problem ... Impersonation where you want to impersonate the user logged in ... Get rid of the userName attribute ... > identity of the iisusr is changed to a domain account that ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • RE: Access file on another computer with specific username / passw
    ... using the System.Management namespace allows me to create a scope ... with a specific username / password: ... ManagementScope scope = new ManagementScope; ... impersonation class. ...
    (microsoft.public.dotnet.framework)
  • Re: Using RegistryKey.OpenRemoteBaseKey on a non-Domain computer
    ... but it must be because I have the same username and ... I think you might need to use impersonation to "pretend" to be another ... Seth Rowe ... user on the other PC called freddy but when I tried impersonating freddy, ...
    (microsoft.public.dotnet.languages.vb)
  • Username returns blank in AS2005 via ASP.NET 2.0 (CellSetGrid-App)
    ... we currently facing a problem with AS2005 and ASP.NET 2.0 impersonation ... everything works fine (SSO via Kerberos) except that the ... UserName contains the expected value. ...
    (microsoft.public.sqlserver.olap)