locked
Configuration Error "<authentication mode="Windows" />" + 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 co RRS feed

  • Question

  • User-1297834874 posted

    Hi,

    I have created an asp.net web app in localhost and after publish it in run time I get this 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.

    Source Error:

    Line 30:             ASP.NET to identify an incoming user. 
    Line 31:         -->
    Line 32:     <authentication mode="Windows" />
    Line 33:     <!--
    Line 34:             The <customErrors> section enables configuration 

    IIS 7 on Windows 2008 r2 (64 bits) server. runing on Microsoft .NET Framework Version:2.0.50727.4927

    • The appWeb is well created.
    • All Roles Availables in IIS.(Windows Authentication).
    • Each win32 ApplicationPools enabled set to TRUE.
    • IIS Windows Authentication enabled on WebSite.

    This is my web.config file:

    <?xml version="1.0"?>

    <configuration>

      <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
          <section name="Tenaris.Web.UI.Sheets.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
      </configSections>
      <appSettings/>
      <connectionStrings/>

      <system.diagnostics>
        <switches>
          <add name="Remote.Disable" value="1"/>
        </switches>
      </system.diagnostics>

      <system.web>
        <!--
                Set compilation debug="true" to insert debugging
                symbols into the compiled page. Because this
                affects performance, set this value to true only
                during development.
            -->
        <compilation debug="true" />
        <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
        <authentication mode="Windows" />
        <!--
                The <customErrors> section enables configuration
                of what to do if/when an unhandled error occurs
                during the execution of a request. Specifically,
                it enables developers to configure html error pages
                to be displayed in place of a error stack trace.

            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
         -->
        <customErrors mode="Off"/>
      </system.web>
      <applicationSettings>
        <Tenaris.Web.UI.Sheets.Properties.Settings>
          <setting name="Tenaris_DataSheets_Web_DataSource_DataSourceSvc" serializeAs="String">
            <value>http://ttr.saar.apre.siderca.ot/Services/DataSource/2.00/DataSource.asmx</value>
          </setting>
          <setting name="Tenaris_DataSheets_Web_Search_SearchService" serializeAs="String">
            <value>http://ttr.saar.apre.siderca.ot/Services/Search/1.02/Search.asmx</value>
          </setting>
        </Tenaris.Web.UI.Sheets.Properties.Settings>
      </applicationSettings>
    </configuration>

    Best Regards, Jorge Maro.

    Wednesday, June 2, 2010 9:33 AM

Answers

All replies

  • User-2064283741 posted

    Have you made the virtiual directory an applciation?

    How are you "publishing" your app?

     

     

    Wednesday, June 2, 2010 10:03 AM
  • User-1297834874 posted

    Hi, 

    I put the directory under a webSite where I have others web applications working fine.

    Above directory is my app created. this is the complete structure in IIS.

    • TTR is the web site.
    • SheetWeb is the virtual directory.
    • 2.00 is the application.

    I publish it from vstudio 2008 at proyect > publish to a temp folder shared on the web server (not direct to wwwroot folder) then manually I copy from a remote desktop connection to the server the entire application to it's current wwwroot app. folder.

    Regards, Jorge Maro

    Wednesday, June 2, 2010 12:22 PM
  • User744767459 posted

    Hi,

    Have you resolved this issue? If your problem persists, please post the "Source File:" line in the error information and the output of the following command here:

    C:\windows\system32\inetsrv>appcmd list config -section:system.applicationhost/sites

    Here is an article about site and application, for your information:

    Understanding Sites, Applications, and Virtual Directories on IIS 7
    http://learn.iis.net/page.aspx/150/understanding-sites-applications-and-virtual-directories-on-iis-7/

    Thanks.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, June 7, 2010 3:56 AM