开发者

.NET and html pages auth management

开发者 https://www.devze.com 2023-01-11 04:16 出处:网络
I have absolutely no knowledge of .NET but am tasked to think/solve a small issue. I have a web site written in .NE开发者_JAVA百科T which authenticates users before allowing them in. Now there is a ne

I have absolutely no knowledge of .NET but am tasked to think/solve a small issue. I have a web site written in .NE开发者_JAVA百科T 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消