limiting access to files with asp.net
Question posted by: Daniel
(Guest)
on
November 12th, 2005 05:09 AM
limiting access to files with asp.net
is there any way i can make a file only accessible to certain users of my
website? my files are to large to copy to a temp directory and they are of
many types, .exe .xsl .xml etc. i want an href to each file but only allow
users who have the right login-info in their session variable to get to the
files in their directory. is there something built into .net for doing this?
do i need to do some kind of isapi filter and then stream them?
3
Answers Posted
Yes, you can. At IIS, choose site properties, at "Home Directory" tab
click at "Configuration..." button in "application settings" section.
Add application mapping with folowing parameters:
executable: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_ isapi.dll
(C:\WINNT - your windows instalation directory here)
extension: *.*
everything else as consider necessary
after that in global.asax.cs u can handle requests to all types files,
validate user login and so forth.
Best, Ed.
i will try this now, u r the man
"Gomolyako Eduard" <eduard.gomolyako@gmail.com> wrote in message
news:1129556748.983026.215240@g49g2000cwa.googlegr oups.com...[color=blue]
> Yes, you can. At IIS, choose site properties, at "Home Directory" tab
> click at "Configuration..." button in "application settings" section.
> Add application mapping with folowing parameters:
> executable: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_ isapi.dll
> (C:\WINNT - your windows instalation directory here)
> extension: *.*
> everything else as consider necessary
>
> after that in global.asax.cs u can handle requests to all types files,
> validate user login and so forth.
>
> Best, Ed.
>[/color]
Good luck. Apply for information if u'll have any troubles.
Best, Ed.
|
|
|
What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 196,844 network members.
Top Community Contributors
|