Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my .Net MVC web application I am controlling access to a html page (index.html) by using location tag in my web.config file.

This is working fine in my development environment.
But when I publish the website to IIS it is not working and it is showing index.html instead of logon page.

Web.Config:
XML
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" protection="All" />
</authentication>
<location path="index.html">
<system.web>
<authorization>
<deny users="?" ></deny>
</authorization>
</system.web>
</location>
Posted
Updated 13-Dec-10 22:19pm
v3
Comments
Toniyo Jackson 14-Dec-10 1:32am    
Always put your code inside code block.
Dalek Dave 14-Dec-10 4:19am    
Edited for Readability.

1 solution

 
Share this answer
 
Comments
Dalek Dave 14-Dec-10 4:19am    
Good Link

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900