Assembly load problem - System.Web

J

Jeff

Hey

asp.net 2.0

My asp.net 2.0 project has got a assembly load problem:

Some of my web.config settings:

<membership defaultProvider="AH_MembershipProvider"
userIsOnlineTimeWindow="15">
<providers>
<add name="AH_MembershipProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true"
passwordFormat="Encrypted"
maxInvalidPasswordAttempts="5"
passwordAttemptWindows="10"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />
</providers>
</membership>

<roleManager enabled="true" cacheRolesInCookie="true" cookieName="AHROLES"
defaultProvider="AH_RoleProvider">
<providers>
<add name="AH_RoleProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />
</providers>
</roleManager>

********************************************************************************


Server Error in '/myNetwork' 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,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23' or one of
its dependencies. The system cannot find the file specified.

Source Error:

Line 51: connectionStringName="LocalSqlServer"
Line 52: applicationName="/"
Line 53: type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />
Line 54: </providers>
Line 55: </roleManager>

Source File: C:\Documents and Settings\Test\My Documents\Visual Studio
2005\WebSites\HelloWorld\web.config Line: 53

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23' could not be loaded.

=== Pre-bind state information ===
LOG: User = PC3\Test
LOG: DisplayName = System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23
(Fully-specified)
LOG: Appbase = file:///C:/Documents and Settings/Test/My Documents/Visual
Studio 2005/WebSites/HelloWorld/
LOG: Initial PrivatePath = C:\Documents and Settings\Test\My
Documents\Visual Studio 2005\WebSites\HelloWorld\bin
Calling assembly : System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Test\My
Documents\Visual Studio 2005\WebSites\HelloWorld\web.config
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/HelloWorld/0570c87d/5d2b6186/System.Web.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/HelloWorld/0570c87d/5d2b6186/System.Web/System.Web.DLL.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Test/My Documents/Visual Studio
2005/WebSites/HelloWorld/bin/System.Web.DLL.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Test/My Documents/Visual Studio
2005/WebSites/HelloWorld/bin/System.Web/System.Web.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/HelloWorld/0570c87d/5d2b6186/System.Web.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
Files/HelloWorld/0570c87d/5d2b6186/System.Web/System.Web.EXE.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Test/My Documents/Visual Studio
2005/WebSites/HelloWorld/bin/System.Web.EXE.
LOG: Attempting download of new URL file:///C:/Documents and
Settings/Test/My Documents/Visual Studio
2005/WebSites/HelloWorld/bin/System.Web/System.Web.EXE.





--------------------------------------------------------------------------------

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

*************************

This web solution I'm trying to run has 2 projects, 1 project is the asp.net
project itself, and the other project is a Class Library project.

From the trace data above I see that this failes because it tryes to access
a filed named System.Web.EXE. Of course it should be System.Web.DLL, but
somehow my project tryes to access the System.Web.EXE file.

If I remove the RoleManager section in the web.config file, then everything
works.. But I need this section.

Any ideas why I get this error?
 
C

Cowboy \(Gregory A. Beamer\)

Without testing, my guess would be that you have to change this

type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />

to this

type="System.Web.Security.SqlMembershipProvider" />

You also may need to add the assemblies in the compilation section, but I
would try the above first.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
J

Jeff

Thanks, changing:
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />

to this

type="System.Web.Security.SqlMembershipProvider" />

solved the problem. I wonder why I had to remove the "System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23"???

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top