By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,763 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,763 IT Pros & Developers. It's quick & easy.

ASP.NET Development Server Not Loading Locally Referenced Assembly

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.