Solved

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

Posted on 2007-03-22
2
1,092 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
[X]
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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

628 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