473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Impersonate..

I know ASP.NET Forms Auth. do not protect files that are not ASP.NET
other files and I want to protect *.* in a folder. so, IIS IIS mapping
is not an option, because i would have to create a map for each
possible file in the world...

Is it possible to set NTFS security on a folder, and then use
Impersonate feature of dotnet when user successfully logs in?

would that work?

Oct 21 '05 #1
3 1428
Not tried but looks like a possible solution.

Not sure what path you choosed for authentication.and permissions but my
personal preference is to store files outside of the web site and to stream
them using to the browser. Also having the permissions readily available
allows to create the list of available documents for the currently connected
user...

--
Patrice

"tascien" <ta******@ecoaches.com> a écrit dans le message de
news:11*********************@o13g2000cwo.googlegro ups.com...
I know ASP.NET Forms Auth. do not protect files that are not ASP.NET
other files and I want to protect *.* in a folder. so, IIS IIS mapping
is not an option, because i would have to create a map for each
possible file in the world...

Is it possible to set NTFS security on a folder, and then use
Impersonate feature of dotnet when user successfully logs in?

would that work?

Oct 21 '05 #2
That sounds like an attractive option, but what would be the
implication for the following:

1. Server memory. Because it has to read the entire file first into the
memory before sending to user...
2. Some extensions such as .ram requires to pass through other server
filters.

what i really hoped is that i could change the user's current logon
upon successful forms auth.

Anybody can shed light on this???

Oct 21 '05 #3
Yes, if you have access to the user's full credentials, you can cause your
ASP.Net app to impersonate them, thus giving access to files based on user
or role.

See WindowsIdentity.Impersonate
http://msdn.microsoft.com/library/de...onatetopic.asp
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"tascien" <ta******@ecoaches.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
That sounds like an attractive option, but what would be the
implication for the following:

1. Server memory. Because it has to read the entire file first into the
memory before sending to user...
2. Some extensions such as .ram requires to pass through other server
filters.

what i really hoped is that i could change the user's current logon
upon successful forms auth.

Anybody can shed light on this???

Oct 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: moemeelaung | last post by:
Hi ASP/Windows experts out there I really need help with this Impersonate function. I have machine A and B. A hosts my ASP page which is to create a user account on the machine B. The...
1
by: Angelo Castigliola III | last post by:
I am trying to write to the registry of a remote computer that is not on a domain from a computer that is on a domain. I am trying to impersonate an administrator account that is on this remote...
14
by: Ian Frawley | last post by:
Anyone used the WindowsIdentity class with success? I find if I try to change the current identity to one that exists on another machine and then try to perform and action on that machine i.e....
8
by: BLiTZWiNG | last post by:
After playing with the code shown and utilising Willy Denyottes' help, I have come to the conclusion that there is some form of difference between the managed WindowsIdentity.Impersonate() over the...
2
by: Divya | last post by:
Hello, I am developing a simple move file utility to move files from one domain to another in the same internal network. My program runs fine when it reads the parameters (user, domain, password...
6
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need...
1
by: Svein Terje Gaup | last post by:
I have a website running on Windows 2000 Server, that should be able to retrieve data from a datawarehouse on another machine running Windows 2000 Server, SQL Server 2000 and SQL Server 2000...
1
by: Sorin Sandu | last post by:
How can I override Identity Impersonate setting from machine.config on a site on the same server ? I am using impersonate on most web sites but on one I need to use Windows Identity.
2
by: rockdale | last post by:
Hi, all: My asp.net application calles MS speech 5.1 and generate a wav file on server's path. Everything runs perfectly on my development machine. But when I move the appl to production server,...
4
by: =?Utf-8?B?QXZhRGV2?= | last post by:
ASP.Net 2. We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003 32 Bit with IIS 6. A few library classes we wrote uses impersonation in code like explained in this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.