Solved

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

Posted on 2007-03-22
2
1,079 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
C# MVC Insert Multiple Row into DB 2 61
MYSQL responding very slow 3 48
asp.net mvc 2 32
vb.net background worker crossthread 11 27
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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

735 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