473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP.NET Development Server Not Loading Locally Referenced Assembly

mct
Environment
---------------
Visual Studio 2005
..NET 2.0
Windows XP SP2

Scenario
----------
TCLibrary (Class Library)
• Contains MyIdentity and MyPrincipal classes that implement the IIdentity
and IPrincipal interfaces respectively.

TCWebFile (File-system web site)
• The TCLibrary.dll assembly is referenced using a local reference (.refresh
file in the bin folder.)
• The site is using forms authentication.
• The Application_AuthenticateRequest method in the Global.ascx sets the
current HttpContext.User property equal to a new instance of the MyPrincipal
class.

Problem
----------
The following SerializationException is thrown while processing the initial
request.

Server Error in '/TCWebFile' Application.
--------------------------------------------------------------------------------
Type is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationExceptio n: Type
is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[SerializationException: Type is not resolved for member
'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=8bf75122f18cbc44'.]
Microsoft.VisualStudio.WebHost.Connection.get_Remo teIP() +0
Microsoft.VisualStudio.WebHost.Request.GetRemoteAd dress() +58
System.Web.HttpRequest.get_UserHostAddress() +31
System.Web.HttpRequest.get_IsLocal() +29

System.Web.Configuration.CustomErrorsSection.Custo mErrorsEnabled(HttpRequest
request) +132
System.Web.HttpContext.get_IsCustomErrorEnabled() +40
System.Web.Configuration.UrlAuthFailedErrorFormatt er.GetErrorText() +39
System.Web.Security.UrlAuthorizationModule.WriteEr rorMessage(HttpContext
context) +39
System.Web.Security.UrlAuthorizationModule.OnEnter (Object source,
EventArgs eventArgs) +332

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +117

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

Analysis
----------
• The executing AppDomain where the exception is thrown is unable to resolve
the TCLibrary.MyPrincipal type.
• The TCLibrary is loaded in the AppDomain where the
Application_AuthenticateRequest is invoked.
• Using a GAC reference to the TCLibrary assembly solves the problem.
• The problem does not occur when the application is hosted by a local IIS
web site.

Test Case Files
------------------
http://www.easy-sharing.com/127540/TestCase.zip.html
Nov 29 '05 #1
4 3108
Did you get an answer on this problem? I have a similar case.

"mct" wrote:
Environment
---------------
Visual Studio 2005
.NET 2.0
Windows XP SP2

Scenario
----------
TCLibrary (Class Library)
• Contains MyIdentity and MyPrincipal classes that implement the IIdentity
and IPrincipal interfaces respectively.

TCWebFile (File-system web site)
• The TCLibrary.dll assembly is referenced using a local reference (.refresh
file in the bin folder.)
• The site is using forms authentication.
• The Application_AuthenticateRequest method in the Global.ascx sets the
current HttpContext.User property equal to a new instance of the MyPrincipal
class.

Problem
----------
The following SerializationException is thrown while processing the initial
request.

Server Error in '/TCWebFile' Application.
--------------------------------------------------------------------------------
Type is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationExceptio n: Type
is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[SerializationException: Type is not resolved for member
'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=8bf75122f18cbc44'.]
Microsoft.VisualStudio.WebHost.Connection.get_Remo teIP() +0
Microsoft.VisualStudio.WebHost.Request.GetRemoteAd dress() +58
System.Web.HttpRequest.get_UserHostAddress() +31
System.Web.HttpRequest.get_IsLocal() +29

System.Web.Configuration.CustomErrorsSection.Custo mErrorsEnabled(HttpRequest
request) +132
System.Web.HttpContext.get_IsCustomErrorEnabled() +40
System.Web.Configuration.UrlAuthFailedErrorFormatt er.GetErrorText() +39
System.Web.Security.UrlAuthorizationModule.WriteEr rorMessage(HttpContext
context) +39
System.Web.Security.UrlAuthorizationModule.OnEnter (Object source,
EventArgs eventArgs) +332

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +117

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

Analysis
----------
• The executing AppDomain where the exception is thrown is unable to resolve
the TCLibrary.MyPrincipal type.
• The TCLibrary is loaded in the AppDomain where the
Application_AuthenticateRequest is invoked.
• Using a GAC reference to the TCLibrary assembly solves the problem.
• The problem does not occur when the application is hosted by a local IIS
web site.

Test Case Files
------------------
http://www.easy-sharing.com/127540/TestCase.zip.html

Dec 27 '05 #2
mct
No answer yet.

"Lorenc" wrote:
Did you get an answer on this problem? I have a similar case.

"mct" wrote:
Environment
---------------
Visual Studio 2005
.NET 2.0
Windows XP SP2

Scenario
----------
TCLibrary (Class Library)
• Contains MyIdentity and MyPrincipal classes that implement the IIdentity
and IPrincipal interfaces respectively.

TCWebFile (File-system web site)
• The TCLibrary.dll assembly is referenced using a local reference (.refresh
file in the bin folder.)
• The site is using forms authentication.
• The Application_AuthenticateRequest method in the Global.ascx sets the
current HttpContext.User property equal to a new instance of the MyPrincipal
class.

Problem
----------
The following SerializationException is thrown while processing the initial
request.

Server Error in '/TCWebFile' Application.
--------------------------------------------------------------------------------
Type is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationExceptio n: Type
is not resolved for member 'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=8bf75122f18cbc44'.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[SerializationException: Type is not resolved for member
'TCLibrary.MyPrincipal,TCLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=8bf75122f18cbc44'.]
Microsoft.VisualStudio.WebHost.Connection.get_Remo teIP() +0
Microsoft.VisualStudio.WebHost.Request.GetRemoteAd dress() +58
System.Web.HttpRequest.get_UserHostAddress() +31
System.Web.HttpRequest.get_IsLocal() +29

System.Web.Configuration.CustomErrorsSection.Custo mErrorsEnabled(HttpRequest
request) +132
System.Web.HttpContext.get_IsCustomErrorEnabled() +40
System.Web.Configuration.UrlAuthFailedErrorFormatt er.GetErrorText() +39
System.Web.Security.UrlAuthorizationModule.WriteEr rorMessage(HttpContext
context) +39
System.Web.Security.UrlAuthorizationModule.OnEnter (Object source,
EventArgs eventArgs) +332

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +117

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

Analysis
----------
• The executing AppDomain where the exception is thrown is unable to resolve
the TCLibrary.MyPrincipal type.
• The TCLibrary is loaded in the AppDomain where the
Application_AuthenticateRequest is invoked.
• Using a GAC reference to the TCLibrary assembly solves the problem.
• The problem does not occur when the application is hosted by a local IIS
web site.

Test Case Files
------------------
http://www.easy-sharing.com/127540/TestCase.zip.html

Dec 27 '05 #3
Ken
Any info on this yet? I have the same problem and I am getting ready to
resort to session state if I can't get this resolved :(

Thanks!

Jan 9 '06 #4
Joe
Ken,

Did you ever figure this out? I hate to have to redo
the authentication. Thanks

"Ken" <ke**@newsgroups.nospam> wrote in message
news:B1**********************************@microsof t.com...
Any info on this yet? I have the same problem and I am getting ready to
resort to session state if I can't get this resolved :(

Thanks!

Jan 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nick Malik | last post by:
reposting to a wider audience "Nick Malik" <nickmalik@hotmail.nospam.com> wrote in message news:WYONc.203854$XM6.119642@attbi_s53... > My turn to ask a question > > I am working on a plug-in...
6
by: Pete Davis | last post by:
I'm confused about what precisely the limitations are on loading plugins in separate app domains. In all my previous apps that supported plugins, I've loaded them into the same domain as the app,...
1
by: Brian | last post by:
I've looked through the previous posts on this one and have verified permissions and location of my Dlls, but I am still getting an exception when I try to Load an assembly. The directory where...
5
by: Shawn Berg | last post by:
I have just finished reading the "Team Development with Visual Studio .NET and Visual SourceSafe" patterns & practices white paper. I just wanted to get a good feel from others if what they suggest...
16
by: Linus | last post by:
Being a ASP developer for a consultant company thinking of starting developing with ASP.NET I have read literally hundreds of web pages and posts in discussion forums on the Internet to get an idea...
2
by: Patrick Ravi-Pinto | last post by:
Dear colleagues, i'm new in the .net programming and hope you can help me. I have two classes: Employee and Address The Employee class has a reference to the Address and imports them on the...
2
by: jnick | last post by:
I have the predicament of having to load several assemblies on the fly and when I do so, I get an exception stating that one of the referenced assemblies cannot be found. Is there any way to...
5
by: Mantorok | last post by:
Hi I have a project that references one of our components, is there a way in ..Net to get a list of references that the application is depending on? The reason for this is so I can load...
8
by: =?Utf-8?B?TWFyaw==?= | last post by:
We've got a wierd failure happening on just one machine. One part of our product uses a 3rd party search implementation (dtSearch). DtSearch has a native core (dten600.dll), late-bound, and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.