General discussion

Locked

Problem with Web.Config

By aniruddha_mukherjee ·
While trying to access the admin section error ocuring :"
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."


I have a web site called KK developed in Asp.Net, this site will be accessed by anonymous users and hence in the web.config file the authentication mode is "none" and the IIS auth is also anonymous. But if some body trying to access the ADMIN section then it has to redirect to the login page for which I have taken a login page. I have a folder called "Admin" in the application and I am placing another web.config file there mentioning the authentication mode="Form" and the loginurl as the url of the page. But while accessing the admin pages showing the above error.
Folks I seek help immediately

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by a_n_t_a_r_e_s In reply to Problem with Web.Config

Configure the directory as an IIS application.
-Antares.

Collapse -

by a_n_t_a_r_e_s In reply to

Oh, I almost forgot to mention, Add the web.config file to the "secured files" folder and make the following change:
<authentication mode="Forms">
<forms loginUrl="../LoginPage.aspx">
</forms>
</authentication>

<!-- Notice the path secified, Use ../

<authorization>
<!--<allow users="?" />
!-->
<deny users="*" />
</authorization>

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums