Web.config not recognized in root directory

Discussion in 'ASP .Net' started by savajx1, Jan 19, 2006.

  1. savajx1

    savajx1 Guest

    I am using the new "web deployment addin" in VS 2005 to output my web
    site. The web site is correctly output (assemblies generated in the
    \bin subdirectory). The web site on my developement machine (WIN 2K
    OS) can be accessed and works correctly from other workstations (i.e no
    problem here).

    The problem:
    When deploying the web site (by just copying the correct subdirectories
    and creating the application in IIS 6) on 2 dffering Windows Server
    2003 OS's, IIS 6 (or ASP.NET) fails to recognize that there is a
    web.config file in the web application's main root directory. At least
    that is what I think is going on. I get an error message showing that
    it is using the default membership provider , as designated in the
    default machine.config file (see the error message that we are getting
    from IIS 6 below). I know that I have replaced this section (the
    membership providers) in the web.config file, and it works fine on my
    development workstations (see that section below). Don't ask me how,
    but I actually got the web site up and running on one of the Windows
    2003 servers. I thought that I knew what I had done, but I can not
    reproduce a successful deployment on the 2nd Windows 2003 Server. We
    have been trying to solve this problem for 2 days and are getting
    nowhere. The ASP.Net tab/snapin is showing that it is reading the
    web.config correctly but we think that this is bogus as it is probably
    just reading the file (i.e that doesn't mean the IIS 6 actually uses
    it). This web site is supposed to go live next Monday. Does anyone
    have any ideas as to what is going on??????? Any help or ideas would
    be greatly appreciated!


    The following error message indicates to me that it is not even
    "loading" (seeing) my web. config file
    *******************************************************************************************************
    Configuration Error
    Description: An error occurred during the processing of a configuration
    file required to service this request. Please review the specific error
    details below and modify your configuration file appropriately.

    Parser Error Message: The connection name 'LocalSqlServer' was not
    found in the applications configuration or the connection string is
    empty.

    Source Error:


    Line 164: <providers>
    Line 165: <add name="AspNetSqlRoleProvider"
    connectionStringName="LocalSqlServer" applicationName="/"
    Line 166: type="System.Web.Security.SqlRoleProvider,
    System.Web, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a" />
    Line 167: <add name="AspNetWindowsTokenRoleProvider"
    applicationName="/"
    Line 168:
    type="System.Web.Security.WindowsTokenRoleProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />


    Source File:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
    Line: 166


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42;
    ASP.NET Version:2.0.50727.42

    *********************************************************************************************
    **********************************************************************************************
    HERE IS SAME SECTION IN WEB.CONFILE FILE

    <membership>
    <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="MembershipSqlServer"
    enablePasswordRetrieval="true" enablePasswordReset="true"
    requiresQuestionAndAnswer="true" applicationName="/"
    passwordFormat="Encrypted" requiresUniqueEmail="false"
    maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
    minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
    passwordStrengthRegularExpression=""/>
    <add name="AdminSqlMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="MembershipSqlServer"
    enablePasswordRetrieval="true" enablePasswordReset="true"
    requiresQuestionAndAnswer="false" applicationName="/"
    passwordFormat="Encrypted" requiresUniqueEmail="false"
    maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
    minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
    passwordStrengthRegularExpression=""/>
    </providers>
    </membership>

    ******************************************************************************************************
    Jim Savarino
    Group Health Cooperative
    Seattle WA 98103
    savajx1, Jan 19, 2006
    #1
    1. Advertising

  2. savajx1

    savajx1 Guest

    OK. I answer my own post to ensure no one spends time on this. This
    has nothing to do with it not reading the web.config file. I quickly
    inspected the error message, saw localsqlserver and thought that it was
    telling me that it was was trying to load the default membership
    provider. WRONG! I had changed the machine.config file on my local
    computer so as to refer to a different role provider. I moved my
    workstation's machine.config to one of the Win 2003 OS's yesterday
    which is why it started working. The external production Windows 2003
    server has the original machine.config.

    Bottom line: I was not overriding the role provider in my web.config
    file so the error message is in fact correct

    J.S.

    savajx1 wrote:
    > I am using the new "web deployment addin" in VS 2005 to output my web
    > site. The web site is correctly output (assemblies generated in the
    > \bin subdirectory). The web site on my developement machine (WIN 2K
    > OS) can be accessed and works correctly from other workstations (i.e no
    > problem here).
    >
    > The problem:
    > When deploying the web site (by just copying the correct subdirectories
    > and creating the application in IIS 6) on 2 dffering Windows Server
    > 2003 OS's, IIS 6 (or ASP.NET) fails to recognize that there is a
    > web.config file in the web application's main root directory. At least
    > that is what I think is going on. I get an error message showing that
    > it is using the default membership provider , as designated in the
    > default machine.config file (see the error message that we are getting
    > from IIS 6 below). I know that I have replaced this section (the
    > membership providers) in the web.config file, and it works fine on my
    > development workstations (see that section below). Don't ask me how,
    > but I actually got the web site up and running on one of the Windows
    > 2003 servers. I thought that I knew what I had done, but I can not
    > reproduce a successful deployment on the 2nd Windows 2003 Server. We
    > have been trying to solve this problem for 2 days and are getting
    > nowhere. The ASP.Net tab/snapin is showing that it is reading the
    > web.config correctly but we think that this is bogus as it is probably
    > just reading the file (i.e that doesn't mean the IIS 6 actually uses
    > it). This web site is supposed to go live next Monday. Does anyone
    > have any ideas as to what is going on??????? Any help or ideas would
    > be greatly appreciated!
    >
    >
    > The following error message indicates to me that it is not even
    > "loading" (seeing) my web. config file
    > *******************************************************************************************************
    > Configuration Error
    > Description: An error occurred during the processing of a configuration
    > file required to service this request. Please review the specific error
    > details below and modify your configuration file appropriately.
    >
    > Parser Error Message: The connection name 'LocalSqlServer' was not
    > found in the applications configuration or the connection string is
    > empty.
    >
    > Source Error:
    >
    >
    > Line 164: <providers>
    > Line 165: <add name="AspNetSqlRoleProvider"
    > connectionStringName="LocalSqlServer" applicationName="/"
    > Line 166: type="System.Web.Security.SqlRoleProvider,
    > System.Web, Version=2.0.0.0, Culture=neutral,
    > PublicKeyToken=b03f5f7f11d50a3a" />
    > Line 167: <add name="AspNetWindowsTokenRoleProvider"
    > applicationName="/"
    > Line 168:
    > type="System.Web.Security.WindowsTokenRoleProvider, System.Web,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    >
    >
    > Source File:
    > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
    > Line: 166
    >
    >
    > --------------------------------------------------------------------------------
    > Version Information: Microsoft .NET Framework Version:2.0.50727.42;
    > ASP.NET Version:2.0.50727.42
    >
    > *********************************************************************************************
    > **********************************************************************************************
    > HERE IS SAME SECTION IN WEB.CONFILE FILE
    >
    > <membership>
    > <providers>
    > <clear/>
    > <add name="AspNetSqlMembershipProvider"
    > type="System.Web.Security.SqlMembershipProvider, System.Web,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    > connectionStringName="MembershipSqlServer"
    > enablePasswordRetrieval="true" enablePasswordReset="true"
    > requiresQuestionAndAnswer="true" applicationName="/"
    > passwordFormat="Encrypted" requiresUniqueEmail="false"
    > maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
    > minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
    > passwordStrengthRegularExpression=""/>
    > <add name="AdminSqlMembershipProvider"
    > type="System.Web.Security.SqlMembershipProvider, System.Web,
    > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    > connectionStringName="MembershipSqlServer"
    > enablePasswordRetrieval="true" enablePasswordReset="true"
    > requiresQuestionAndAnswer="false" applicationName="/"
    > passwordFormat="Encrypted" requiresUniqueEmail="false"
    > maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"
    > minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
    > passwordStrengthRegularExpression=""/>
    > </providers>
    > </membership>
    >
    > ******************************************************************************************************
    > Jim Savarino
    > Group Health Cooperative
    > Seattle WA 98103
    savajx1, Jan 19, 2006
    #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. dotnetprogram
    Replies:
    1
    Views:
    706
    Joey Powell
    Dec 27, 2003
  2. Jiong Feng
    Replies:
    3
    Views:
    2,026
    Chris Moore
    Apr 30, 2004
  3. =?Utf-8?B?ZW5jYXBzdWw=?=

    Dynamically created directory not recognized by web server

    =?Utf-8?B?ZW5jYXBzdWw=?=, Feb 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    379
    Joshua Flanagan
    Feb 28, 2005
  4. Benny Ng
    Replies:
    9
    Views:
    9,915
    Benny Ng
    Oct 13, 2005
  5. CSharpner
    Replies:
    0
    Views:
    1,001
    CSharpner
    Apr 9, 2007
Loading...

Share This Page