Re: Getting Virtual Directory not configured error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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" <Nick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B20DEA36-01C0-404A-BF2C-1291AB1125DA@xxxxxxxxxxxxxxxx
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" <Nick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C36444DF-BAF9-4B3A-B42A-A0785F32910A@xxxxxxxxxxxxxxxx
>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#


.



Relevant Pages

  • Re: IIS Bug
    ... I don't understanrfrrrr5d your configuration. ... IIS Supportability Lead ... Virtual directory is set to anonymous ... >>password and authentication fails. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Basic Authentication fails with Error 401.2 where Integrated succe
    ... directory that is protected by Basic Authentication. ... The directory is configured in IIS with only Basic Authentication checked ... the integrated authentication box in the IIS security configuration, ...
    (microsoft.public.inetserver.iis.security)
  • Re: IIS 6 fails anonymous connection
    ... It sounded like you configured sub-authentication, which on prior IIS ... The reason that you have to have Integrated authentication enabled along ... so there is some sort of configuration problem specific to ... The resources must also be ACL'd for this user account or else you will get ...
    (microsoft.public.inetserver.iis.security)
  • Re: Default app?
    ... Yes, there is, but for *any* page served by IIS, not just for pages served by ASP.NET. ... But the site at its root is not configured as a .net 'application' either ... if -as you say- it resides in the web-doc root folder. ... No extra configuration is needed. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS requiring authentication
    ... into IIS Manager and checked the Directory Security settings. ... it had shown "Integrated Windows authentication" for when anonymous ... I have not been at the keyboard of this server for over a month, ... not changed server configuration. ...
    (microsoft.public.inetserver.iis.security)