Hi everybody,
I have a subfolder on my website. The subfolder is not a virtual directory. I want access to pages in this subfolder to be authenticated using Forms. I included location clause in my web.config and I thought it was working in .NET 1.1 (although it has been a while since I used in in 1.1).
Now, after updating the site to .NET 2.0, I get the following error on the authentication mode line when running a page in the subfolder:
It is an error to use a section as allowDefinition='MichineToApplication beyond
application level. This error can be caused by a virtual directory
not being configured as an application in IIS.
Note that the subfolder was never a virtual directory (even in .NET 1.1) and from my memory it worked. And I cannot make this subfolder a virtual directory (rule of the hosting site).
Here is the section of the web.config:
<location path="mysubfolder" >
<system.web>
<authentication mode="Forms" >
<forms name="MyApp" path="/" loginUrl="AppLogon.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
Any suggestions to what I might need to change in the web.config?
Thank you
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham