It is an error to use a section allowDefinition='MachineToApplicat



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.
.



Relevant Pages

  • RE: It is an error to use a section allowDefinition=MachineToApplicat
    ... I resolved the outstanding issue. ... This path is defined as a Virtual Directory in IIS. ... The "Administration" subfolder is also defined as a Virtual Directory. ... VS.NET 2005 comes up with the above error on the SessionState line here on ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: SBS2k3 and activesync over the air
    ... the Exchweb virtual directory. ... ONLY 'Basic authentication' is selected ... please restart your IIS service and test your issue again. ... Regarding ActiveSync issue, support code 0x85010014 means error HTTP 500. ...
    (microsoft.public.windows.server.sbs)
  • Re: Exchange OMA issue
    ... provide Outlook Web Access, Exchange ActiveSync, and Outlook Mobile Access ... For Exchange-oma virtual directory and the virtual directory you created ... Open IIS Manager ... Select Edit in Authentication and access control box. ...
    (microsoft.public.windows.server.sbs)
  • Re: Nokia E50 ActiveSync problem with SBS2003 SP2
    ... Open IIS Manager ... Open properties of virtual directory OMA ... Click Start on your SBS server, ... And then please verify Authentication settings by the following steps. ...
    (microsoft.public.windows.server.sbs)
  • RE: Error while running a virtual site by using a mapped drive
    ... IIS6/win2003 std server. ... ** the virtual directory is not existing or accessible, for example, you ... ** the IIS process doesn't have sufficient permission to access the ... is not correctly configured for the virtual directory's UNC share. ...
    (microsoft.public.dotnet.framework.aspnet.security)