Link to home
Create AccountLog in
Avatar of toooki
toooki

asked on

ASP.net error allowDefinition='MachineToApplication' beyond application level

User generated imageWhen I compile my ASP.Net web application(written in C#) I get the error:

Error      27      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.      C:\MYPROC\dir_29.6\MyWebSoln\Web.config      133      

The line number points to the content:
<sessionState timeout="180" mode="InProc" cookieless="false"/>

If I remove the above line, I get the same error for the following line:
<authentication mode="Windows"/>

My application files are like this:
C:\MYPROC\dir_29.6\MyWebSoln\Web.config

I created a Website alias in the IIS manager (WIndows 7), for the physical path: C:\MYPROC\dir_29.6\MyWebSoln and restarted IIS.

I still get the above error. Could you please suggest a workaround? Thank you.
ASKER CERTIFIED SOLUTION
Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of toooki
toooki

ASKER

Thank you! That worked!! It was of extreme help!! I was struggling for days!!
Many Thanks!
Glad it's working for you.

Thanks for the points and grade!