Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2007-03-22
2
1,077 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:verdante
2 Comments
 
LVL 21

Accepted Solution

by:
tovvenki earned 500 total points
ID: 18777521
Hi,
change the line
type="System.Web.Security.SqlMembershipProvider,
                                        System.Web, 2.0.0.0, Culture=neutral, PublicKeyToken=null"/>

to

type="System.Web.Security.SqlMembershipProvider"

Kind Regards
Venki

0
 

Author Comment

by:verdante
ID: 18786557
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
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question