Ask a Question related to ASP.NET Security, Design and Development.
-
Olav Tollefsen #1
Role based access to photos (jpeg files)?
I need to role based access to photo files stored on a Windows Server 2003
based web server. The user should only be given access to certain files
stored on the web server provided that some application logic grants access
to the files (could be single files in a directory where multiple files are
stored).
How can this be done?
Olav
Olav Tollefsen Guest
-
Do I need Role Based Security
Corinna, In your example i'd say its not necessary to use role-based security. Since there's only 1 level of membership as you say then all I... -
Role-Based Authorization
I am using ASP.NET and Access as the database. I would like to use role-based authorization for the login page. Can anyone help me? -
Reg Role BAsed security..
Hi All.. Can any body detail out the basic diff/advatages/disadvantage over acheiving the role based security and the same thing in case of... -
Role Based Solution - Help
Hi I am trying to decide on the best way to implement a role based security solution for a dotNET website. I am keen to use the Identities,... -
David Coe #2
RE: Role based access to photos (jpeg files)?
Olav
You can grant access to files on a file by file basis or by directory. In the web.config file, just outside of the <system.web> element, enter
<location path="jpegFolderName"><system.web><authorization>< allow users="allowedUserName" /><deny users="?" /></authorization></system.web></location>
David Coe Guest
-
Olav Tollefsen #3
Re: Role based access to photos (jpeg files)?
I can't do it statically as suggested below. I MUST be able make decisions
in the code weather to allow access or not.
Olav
"David Coe" <dhc0e@aol.com> wrote in message
news:5C3BE319-90B9-4414-BB9D-4341D990F821@microsoft.com...the web.config file, just outside of the <system.web> element, enter:> Olav -
>
> You can grant access to files on a file by file basis or by directory. Inusers="allowedUserName" /><deny users="?">
> <location path="jpegFolderName"><system.web><authorization>< allow
/></authorization></system.web></location>
Olav Tollefsen Guest
-
Joe Kaplan \(MVP - ADSI\) #4
Re: Role based access to photos (jpeg files)?
Would you consider writing an HttpHandler to do this for you? It is easier
than you might think to write some .NET code that returns images back to the
browser and the ability to write code to authorize the request would seem to
provide you with what you need.
The big decision then would be whether you would use the .ashx extension for
your handler as it typical of custom handlers or if you would remap the IIS
metabase to point .jpg files to .NET and write a custom handler for .jpg
files. Either way would work. It depends more on how the URL needs to look
to the consumer. The .ashx is easier to deploy since it doesn't require
changing the IIS metabase.
Joe K.
"Olav Tollefsen" <x@y.com> wrote in message
news:%230MRBF97DHA.3704@tk2msftngp13.phx.gbl...In> I can't do it statically as suggested below. I MUST be able make decisions
> in the code weather to allow access or not.
>
> Olav
>
> "David Coe" <dhc0e@aol.com> wrote in message
> news:5C3BE319-90B9-4414-BB9D-4341D990F821@microsoft.com...> > Olav -
> >
> > You can grant access to files on a file by file basis or by directory.> the web.config file, just outside of the <system.web> element, enter:> users="allowedUserName" /><deny users="?"> >
> > <location path="jpegFolderName"><system.web><authorization>< allow
> /></authorization></system.web></location>
>
>
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

