473,385 Members | 1,531 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,385 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 3107
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.