Re: Getting Virtual Directory not configured error

Discussion in 'ASP .Net' started by Tim Mackey, Jan 23, 2007.

  1. Tim Mackey

    Tim Mackey Guest

    hi nick,
    seems strange that you have configured Windows authentication, but provided
    a Forms loginUrl? perhaps asp.net is getting confused by this apparent
    contradiction? can you try deleting the authentication sections?

    tim

    "Nick" <> wrote in message
    news:...
    >I am getting the following errors when building my web project:
    >
    > Error 78 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:\IList_WareHouse_Solution\Web\Web.config 42
    >
    > I have a virtual directory configured in IIS and it still doesn't work.
    > Here are some snapshots of my configurations:
    >
    >
    >
    > http://www.imagehangar.com/view.php?pic=large/59981200_1169488281.jpg
    >
    > here is my IIS virtual directory configuration:
    >
    > http://www.imagehangar.com/view.php?pic=large/23563100_1169488391.jpg
    >
    > and Here is my web.conifig that the error message is refering too:
    >
    >
    > <?xml version="1.0"?>
    > <configuration
    > xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    > <configSections>
    > <sectionGroup name="system.web">
    > <section name="viewstateService"
    > type="WareHouse.Framework.ViewState.ViewStateProviderServiceSection,
    > ViewState" allowDefinition="MachineToApplication"
    > restartOnExternalChanges="true"/>
    > </sectionGroup>
    > </configSections>
    > <connectionStrings>
    > <add name="aspnetdbConnectionString" connectionString="Data
    > Source=.\SQLEXPRESS;Initial Catalog=aspnetdb;Integrated Security=True"
    > providerName="System.Data.SqlClient" />
    > <add name="System.Data.SqlClient" connectionString="Data
    > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    > Security=True"
    > providerName="System.Data.SqlClient" />
    > <add name="WareHouseConnectionString2" connectionString="Data
    > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    > Security=True"
    > providerName="System.Data.SqlClient" />
    > <add name="WareHouseConnectionString3" connectionString="Data
    > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    > Security=True"
    > providerName="System.Data.SqlClient" />
    > </connectionStrings>
    > <appSettings>
    > <add key="DataProvider" value="System.Data.SqlClient"/>
    > </appSettings>
    > <system.web>
    > <!--
    > Custom viewstate provider service
    > -->
    > <pages theme="MSN_Blue" />
    > <viewstateService defaultProvider="ViewStateProviderGlobal">
    > <providers>
    > <add name="ViewStateProviderCache"
    > type="WareHouse.Framework.ViewState.ViewStateProviderCache"/>
    > <add name="ViewStateProviderGlobal"
    > type="WareHouse.Framework.ViewState.ViewStateProviderGlobal"/>
    > <add name="ViewStateProviderSession"
    > type="WareHouse.Framework.ViewState.ViewStateProviderSession"/>
    > </providers>
    > </viewstateService>
    >
    > <compilation debug="true">
    > <assemblies>
    > <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System.Design, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B03F5F7F11D50A3A"/>
    > <add assembly="System.Management, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B03F5F7F11D50A3A"/>
    > <add assembly="System.Configuration.Install, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    > <add assembly="System.Data.OracleClient, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B03F5F7F11D50A3A"/>
    > <add assembly="System.Data, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System.Web, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B03F5F7F11D50A3A"/>
    > <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B77A5C561934E089"/>
    > <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
    > </compilation>
    > <authentication mode="Windows"/>
    > <authentication>
    > <forms loginUrl="~/WH/login.aspx"/>
    > </authentication>
    > </system.web>
    > </configuration>
    >
    >
    > This has driven me crazy for two weeks and I'm out of ideas.
    >
    > thanks
    > nick
    >
    > asp.net/c#
    Tim Mackey, Jan 23, 2007
    #1
    1. Advertising

  2. Tim Mackey

    Tim Mackey Guest

    hi Nick,
    if you have a root web.config and a sub-directory web.config file, that
    could explain the error you mentioned if the either one is not configured
    correctly. i would be happy to test your configuration on my own IIS
    server. perhaps you could reply with both of the web.config files. i will
    assume that the IIS 'application' is created on the subdirectory, as you
    indicated in your original post.

    tim

    "Nick" <> wrote in message
    news:...
    > Thanks for answer back I commented out
    >
    > <authentication mode="Windows"/>
    >
    > and built it, but ddn't work. It complaining alway when it gets too the
    > following line:
    >
    >
    > <viewstateService defaultProvider="ViewStateProviderGlobal">
    >
    > I don't know if this is where the problem exist. It's funny that this was
    > working without IIS configuration on my machine, and as soon as I rebuilt
    > it
    > once the problem started occurring. Originally I had the above mentioned
    > authentication mode in the root web.config and another web.config file
    > (the
    > one I posted here) was in another folder called Web. I thought this was
    > a
    > problem so I got rid of the root web.conifig and just kept one web.config
    > file in the folder web as shown in my VS Explorer image. I even commented
    > out
    >
    > <authentication>
    > <forms loginUrl="~/WH/login.aspx"/>
    > </authentication>
    >
    > but it made no difference. Any other suggestions.
    >
    > thanks again
    > Nick
    >
    >
    >
    > "Tim Mackey" wrote:
    >
    >> hi nick,
    >> seems strange that you have configured Windows authentication, but
    >> provided
    >> a Forms loginUrl? perhaps asp.net is getting confused by this apparent
    >> contradiction? can you try deleting the authentication sections?
    >>
    >> tim
    >>
    >> "Nick" <> wrote in message
    >> news:...
    >> >I am getting the following errors when building my web project:
    >> >
    >> > Error 78 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:\IList_WareHouse_Solution\Web\Web.config 42
    >> >
    >> > I have a virtual directory configured in IIS and it still doesn't work.
    >> > Here are some snapshots of my configurations:
    >> >
    >> >
    >> >
    >> > http://www.imagehangar.com/view.php?pic=large/59981200_1169488281.jpg
    >> >
    >> > here is my IIS virtual directory configuration:
    >> >
    >> > http://www.imagehangar.com/view.php?pic=large/23563100_1169488391.jpg
    >> >
    >> > and Here is my web.conifig that the error message is refering too:
    >> >
    >> >
    >> > <?xml version="1.0"?>
    >> > <configuration
    >> > xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    >> > <configSections>
    >> > <sectionGroup name="system.web">
    >> > <section name="viewstateService"
    >> > type="WareHouse.Framework.ViewState.ViewStateProviderServiceSection,
    >> > ViewState" allowDefinition="MachineToApplication"
    >> > restartOnExternalChanges="true"/>
    >> > </sectionGroup>
    >> > </configSections>
    >> > <connectionStrings>
    >> > <add name="aspnetdbConnectionString" connectionString="Data
    >> > Source=.\SQLEXPRESS;Initial Catalog=aspnetdb;Integrated Security=True"
    >> > providerName="System.Data.SqlClient" />
    >> > <add name="System.Data.SqlClient" connectionString="Data
    >> > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    >> > Security=True"
    >> > providerName="System.Data.SqlClient" />
    >> > <add name="WareHouseConnectionString2" connectionString="Data
    >> > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    >> > Security=True"
    >> > providerName="System.Data.SqlClient" />
    >> > <add name="WareHouseConnectionString3" connectionString="Data
    >> > Source=PROBWINSQL\PROBSQL2005;Initial Catalog=WareHouse;Integrated
    >> > Security=True"
    >> > providerName="System.Data.SqlClient" />
    >> > </connectionStrings>
    >> > <appSettings>
    >> > <add key="DataProvider" value="System.Data.SqlClient"/>
    >> > </appSettings>
    >> > <system.web>
    >> > <!--
    >> > Custom viewstate provider service
    >> > -->
    >> > <pages theme="MSN_Blue" />
    >> > <viewstateService defaultProvider="ViewStateProviderGlobal">
    >> > <providers>
    >> > <add name="ViewStateProviderCache"
    >> > type="WareHouse.Framework.ViewState.ViewStateProviderCache"/>
    >> > <add name="ViewStateProviderGlobal"
    >> > type="WareHouse.Framework.ViewState.ViewStateProviderGlobal"/>
    >> > <add name="ViewStateProviderSession"
    >> > type="WareHouse.Framework.ViewState.ViewStateProviderSession"/>
    >> > </providers>
    >> > </viewstateService>
    >> >
    >> > <compilation debug="true">
    >> > <assemblies>
    >> > <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System.Design, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B03F5F7F11D50A3A"/>
    >> > <add assembly="System.Management, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B03F5F7F11D50A3A"/>
    >> > <add assembly="System.Configuration.Install, Version=2.0.0.0,
    >> > Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    >> > <add assembly="System.Data.OracleClient, Version=2.0.0.0,
    >> > Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B03F5F7F11D50A3A"/>
    >> > <add assembly="System.Data, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System.Web, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B03F5F7F11D50A3A"/>
    >> > <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B77A5C561934E089"/>
    >> > <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral,
    >> > PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
    >> > </compilation>
    >> > <authentication mode="Windows"/>
    >> > <authentication>
    >> > <forms loginUrl="~/WH/login.aspx"/>
    >> > </authentication>
    >> > </system.web>
    >> > </configuration>
    >> >
    >> >
    >> > This has driven me crazy for two weeks and I'm out of ideas.
    >> >
    >> > thanks
    >> > nick
    >> >
    >> > asp.net/c#

    >>
    Tim Mackey, Jan 23, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Zych
    Replies:
    0
    Views:
    1,845
    Tim Zych
    Dec 23, 2003
  2. =?Utf-8?B?UGF1bA==?=

    Virtual directory not configured as an application

    =?Utf-8?B?UGF1bA==?=, Dec 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    20,460
    =?Utf-8?B?UGF1bA==?=
    Dec 22, 2004
  3. Dave
    Replies:
    1
    Views:
    9,723
    Steven Cheng[MSFT]
    Oct 24, 2005
  4. scott
    Replies:
    1
    Views:
    1,060
    scott
    Jun 12, 2006
  5. Adam Sandler
    Replies:
    0
    Views:
    394
    Adam Sandler
    Jan 22, 2007
Loading...

Share This Page