Print Page | Close Window

Custom Security

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9953
Printed Date: 29 March 2026 at 10:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Custom Security
Posted By: Diep-Vriezer
Subject: Custom Security
Date Posted: 11 April 2004 at 3:11pm

Hey all,

I would like to have an ASP.NET security system, which protects files in all formats, so file.exe and file.aspx are both protected. All the formats the server knows are being controlled by the aspnet_isapi.dll filter.

Anyway, I haven't got a clue where to start. I want a system that looks a bit like the .NET Forms system, but I want to set individual permissions for each file, or a whole directory, and the users that login are not Windows accounts, which is the case when using Integrated Authentication.

So, does any of you guys happen to know how to call a function whenever a file.extention gets requested? Or explain how to use the Global.asax if involved?



-------------
Gone..



Replies:
Posted By: Semikolon
Date Posted: 11 April 2004 at 5:13pm

Not sure, but I THINK you have to map the files to a DLL..

something similar was discussed in the jodohost forums, I can try to dig up the thread if you want



Posted By: Semikolon
Date Posted: 11 April 2004 at 5:38pm

I didn't understand sh*t of it, but I don't know .Net either so it wasn't very surprising

 

look at this thread http://support.jodohost.com/showthread.php?t=1508 - http://support.jodohost.com/showthread.php?t=1508  it's mainly about image hotlinking, but I think it maybe can help you



Posted By: Semikolon
Date Posted: 11 April 2004 at 5:40pm

Originally posted by Diep-Vriezer Diep-Vriezer wrote:

Do you mean this one? http://support.jodohost.com/showthread.php?t=1508&highlight=asp.net+security - http://support.jodohost.com/showthread.php?t=1508&highli ght=asp.net+security , which forwards to http://www.irritatedvowel.com/Programming/DeepLinkingHttpModule.aspx - http://www.irritatedvowel.com/Programming/DeepLinkingHttpMod ule.aspx

 

looks like that's the one yeah



Posted By: Mart
Date Posted: 11 April 2004 at 6:18pm
For that you would use a HTTP Handler. Do a google for "http handlers in asp.net". You may also find useful stuff if you search for http modules.


Posted By: Diep-Vriezer
Date Posted: 11 April 2004 at 6:37pm
Alright. Implenting a http handler isn't verry difficult. Mart, do you think it's better to compile the handler in DLL and attach that to the project, or just compile the handler within the project?

-------------
Gone..


Posted By: dpyers
Date Posted: 11 April 2004 at 8:57pm
At http://www.asp.net - www.asp.net , the Community Starter kit uses an http handler to handle urls for .gif, .jpg, and jpeg images. The methodology is pretty well discussed on their CSK forum. One of the things it entails is mapping those extensions in IIS to the aspnet dll for the domain.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Mart
Date Posted: 12 April 2004 at 3:30am
I think its better to just write an uncompiled class in the same project. Then youve got less DLL's to ship when you redistrbute. At devjunkies.com we have got it working fine without a seperate DLL.


Posted By: Diep-Vriezer
Date Posted: 12 April 2004 at 7:30am

K, thx



-------------
Gone..


Posted By: dpyers
Date Posted: 12 April 2004 at 12:00pm

Personally, I prefer just putting the uncompiled class in the project as it makes it easier to extend the class as needed for different projects without being concerned that you have different versions of a dll in different projects. You can extend the class from the dll, but I like having the code "in my face".

Some things I put into a utility dll are boiler plate info - Terms of use, copyright, etc, -  and common forms - e.g. email contact form.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Diep-Vriezer
Date Posted: 12 April 2004 at 3:11pm
Well, I usually don't work with lose DLL's, only if I build a component which has to be sold. Then I create a DLL file with the strong name validation, and that's it.

-------------
Gone..


Posted By: Mart
Date Posted: 12 April 2004 at 3:12pm
Theres nothing stopping you reusing uncompiled classes either.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net