views:

19

answers:

1

I have absolutely no knowledge of .NET but am tasked to think/solve a small issue. I have a web site written in .NET which authenticates users before allowing them in. Now there is a new directory containing static html pages that must be controlled using the same auth session. I want to achieve this without having to convert the html pages into .NET because the team working on that is not .NET aware. Also I don't want to have a web server specific auth configuration as that would mean the current auth session cannot be used. Is there a way to solve this? Ideally I would want to have some equivalent of a filter in java (though the filters are activated only if its a jsp) which checks the directory and checks the auth session. So my web app directory setting is this way --

App/
| --- All .NET
| --- htmldir/*.html

I want all of these to use the same auth management as the .NET app.

Any inputs are appreciated. Please point me to the documents or books to read up on.

  • Pav
A: 

I don't know if Mono implements system.web.routing but some versions of .NET does. You might be able to use that to forward all requests to app/html through a page that checks for login and then if they pass send the html through with a response.write. However I think the best way would be if you could drop the webserver specific requirement and use the webconfig. Normally IIS is used with .NET unless you are using MONO.

David Daniel
I do not want to drop the webserver specific requirement because if I have a different authentication setup for the html pages then the user would be prompted for login again even though he is logged into the .NET site. Also I have to write code to make the web server use the same login and password as the .NET site somehow.