web.config error... allowDefinition='MachineToApplication'

From: ssp (sarnil_at_gmail.com)
Date: 11/21/04

  • Next message: viki: "authorization for sub directory"
    Date: 21 Nov 2004 14:44:56 -0800
    
    

    This one just came out of the blue! One minute it is working and the
    next minute, it drops dead with the error below...

    ===========================
    Parser Error Message: 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 16: />
    Line 17:
    Line 18: <authentication mode="Forms">
    Line 19: <forms name=".XXXAUTH" protection="All"
    timeout="60"
    loginUrl="/login.aspx" />
    Line 20: </authentication>

    =========================

    Below is the full web.config code:

    ==========================
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
           <startup>
                   <supportedRuntime version="v1.1.4322" safemode="true"
    />
           </startup>

           <system.web>

           <compilation
                   defaultLanguage="c#"
                   debug="true"
       />

           <customErrors
                   mode="Off"
       />
    <!-- start comment out -->
           <authentication mode="Forms">
                   <forms name=".XXXAUTH" protection="All" timeout="60"
    loginUrl="/login.aspx" />
           </authentication>

           <authorization>
                   <allow users="*" />
           </authorization>

           <trace
                   enabled="false"
                   requestLimit="10"
                   pageOutput="false"
                   traceMode="SortByTime"
                   localOnly="true"
       />

       <sessionState
               mode="InProc"
               stateConnectionString="tcpip=127.0.0.1:42424"
               sqlConnectionString="data
    source=127.0.0.1;Trusted_Connection=yes"
               cookieless="false"
               timeout="20"
       />
    <!-- end comment out -->
       <globalization
               requestEncoding="utf-8"
               responseEncoding="utf-8"
      />

    </system.web>

    <appSettings>
           <!-- sqlConnection1Encrypted is the encrypted connection of
    sqlConnection1.ConnectionString.
           Encryption is not necessary if this site is hosted inhouse and
    access
    to it is not restricted heavily.
           -->
           <add key="sqlConnection1Encrypted"
    value="AXnhkjjqnRx1ytJ3T8vvjZOvsQEbkvT0HQsweHP2DdVJpYSkpAAMtt3fjT8PayjDGM2HHXkBRH/YLHvnohouzoCNMDnIyr3HFkbQFy5IInHYmwkjm7nZcjTbw2Vv+4lP"
    />
    </appSettings>
    </configuration>

    ==============================

    If I comment out the all code between the sections "commented" above,
    it works fine, the application runs fine, but I cant implement the
    security.

    PLease don't tell me to look "ensure that the folder is configured as
    an application...", because i've looked at that over and over again.

    Funny thing is that another similar application runs fine on my
    machine. no issues at all.

    Any ideas??


  • Next message: viki: "authorization for sub directory"

    Relevant Pages

    • Re: [Timers SMP] can this machine be helped?
      ... It has many peculiarities, so, I wouldn't be surprised if the answer to my questions would be "sorry, the patient is rather dead than alive". ... Some of the problems lie in ACPI area, I tried some time ago to fix the ACPI tables for these machine, but never got enough time for that. ... Switched to high resolution mode on CPU 1 ... Which configuration / command-line parameters should I try? ...
      (Linux-Kernel)
    • [Timers SMP] can this machine be helped?
      ... Another problem is its battery is dead and it's hard soldered to the ... Switched to high resolution mode on CPU 1 ... configuration / command-line parameters should I try? ...
      (Linux-Kernel)
    • Re: PS/2 Model 35 with CMOS and HD problems
      ... If the battery gets ... to be dead enough, then the system will get stuck in a configuration ...
      (comp.sys.ibm.ps2.hardware)
    • Re: web.config
      ... You definitely provided more information in that response. ... First off, the App Settings section appears under the configuration tags, ... It is not an <appsettings> section. ... > "Pete Wright" wrote in message ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Structure analogous to web.config in a windows application???
      ... choose 'Application Configuration'. ... AppSettingsReader appSettings = new AppSettingsReader; ... > the web.config in ASP.NET applications? ...
      (microsoft.public.dotnet.framework.windowsforms)