Link to home
Start Free TrialLog in
Avatar of verdante
verdante

asked on

SqlMembershipProvider provider error: Could not load file or assembly 'System.Web'

I'm trying to create a .NET 2.0 application using the default SqlMembershipProvider provider. I can't seem to get my 'type' statement right in web.config. At the moment I am testing the following script which is an adaptation of an approach documentd on msdn:

<membership defaultProvider="NCACCHSqlConnection" >
      <providers>
            <clear/>
            <add name="NCACCHSqlConnection"
            connectionStringName="NCACCHSqlConnection"
            applicationName="NCACCH"
            passwordFormat="Clear"
            type="System.Web.Security.SqlMembershipProvider,
                                        System.Web, 2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </providers>                  
</membership>

When I attempt to login I can see my application is somehow talking to my SQL Server because it is updating the LastLoginDate field. However I get the following error and I'm stuck:

Server Error in '/WebSite1' Application.
--------------------------------------------------------------------------------

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: Could not load file or assembly 'System.Web' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 100:                        applicationName="NCACCH"
Line 101:                        passwordFormat="Clear"
Line 102:                        type="System.Web.Security.SqlMembershipProvider, System.Web, 2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
Line 103:            </providers>                  
Line 104:      </membership>
 

Source File: C:\Documents and Settings\Michael\My Documents\Visual Studio 2005\WebSites\WebSite1\web.config    Line: 102

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web' could not be loaded.

If I modify the 'type' declaration by removing  
           System.Web, 2.0.0.0, Culture=neutral, PublicKeyToken=nullinformation
I get a null exception error
Please help, this is driving me from drink
cheers
Verdy
ASKER CERTIFIED SOLUTION
Avatar of tovvenki
tovvenki

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of verdante
verdante

ASKER

Thanks for that Venki
I gave it a shot and received a Null error message. When I went back to my User record I realised that some fields had null entries. So I populated them and it all worked beautifully
cheers
Verdy