N
Neal Miller
Hi, I'm getting the following error:
"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 researched this issue a lot, and can say that:
1) The Application's Path is "C:\Inetpub\wwwroot\Appname".
2) This path is defined as a Virtual Directory in IIS.
3) The Application has a subfolder named "Administration".
4) The "Administration" subfolder is also defined as a Virtual Directory.
5) The web.config file in the Appname folder contains the following text:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"-->
<system.web>
<compilation defaultLanguage="c#" debug="true"/>
<xhtmlConformance mode="Legacy" />
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms timeout="2000">
<credentials passwordFormat="Clear">
<user name="username1" password="pwd1"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="false"/>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="2000"/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
</system.web>
</configuration>
6) The web.config file in the Administration subfolder contains the
following text:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"-->
<system.web>
<compilation defaultLanguage="c#" debug="true"/>
<xhtmlConformance mode="Legacy" />
<customErrors mode="Off"/>
<authorization>
<deny users="?"/>
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="false"/>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="2000"/>
</system.web>
</configuration>
VS.NET 2005 comes up with the above error on the SessionState line here on
this subfolder's web.config file. If I remove the sessionState section on
this subfolder's web.config file and re-build, then many pre-compile errors
are detected in VS 2005, including many "Error 2 The name 'Global' does not
exist in the current
context C:\Inetpub\wwwroot\Appname\Administration\ReceiveSystem.aspx.cs 23
", and this error: Warning 1 Invalid search path 'C:\PROGRAM\PCOBOL32'
specified in 'LIB environment variable' -- 'The system cannot find the path
specified. '
If I leave the subfolder's web.config sessionState parameter in it, I only
get the "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." error.
I am aware that sessionState is only supposed to be defined in the top-most
level, but if I do so, I would appreciate any assistance in overcoming the
other errors that I mentioned above.
Thanks in advance.
"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 researched this issue a lot, and can say that:
1) The Application's Path is "C:\Inetpub\wwwroot\Appname".
2) This path is defined as a Virtual Directory in IIS.
3) The Application has a subfolder named "Administration".
4) The "Administration" subfolder is also defined as a Virtual Directory.
5) The web.config file in the Appname folder contains the following text:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"-->
<system.web>
<compilation defaultLanguage="c#" debug="true"/>
<xhtmlConformance mode="Legacy" />
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms timeout="2000">
<credentials passwordFormat="Clear">
<user name="username1" password="pwd1"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="false"/>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="2000"/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
</system.web>
</configuration>
6) The web.config file in the Administration subfolder contains the
following text:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"-->
<system.web>
<compilation defaultLanguage="c#" debug="true"/>
<xhtmlConformance mode="Legacy" />
<customErrors mode="Off"/>
<authorization>
<deny users="?"/>
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="false"/>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="2000"/>
</system.web>
</configuration>
VS.NET 2005 comes up with the above error on the SessionState line here on
this subfolder's web.config file. If I remove the sessionState section on
this subfolder's web.config file and re-build, then many pre-compile errors
are detected in VS 2005, including many "Error 2 The name 'Global' does not
exist in the current
context C:\Inetpub\wwwroot\Appname\Administration\ReceiveSystem.aspx.cs 23
", and this error: Warning 1 Invalid search path 'C:\PROGRAM\PCOBOL32'
specified in 'LIB environment variable' -- 'The system cannot find the path
specified. '
If I leave the subfolder's web.config sessionState parameter in it, I only
get the "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." error.
I am aware that sessionState is only supposed to be defined in the top-most
level, but if I do so, I would appreciate any assistance in overcoming the
other errors that I mentioned above.
Thanks in advance.