Loading a deployed Assembly - System.IO.FileNotFoundException

B

Brian

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 my Dlls are located give the ASPNET user full
control, and all Dlls used by the Assembly in question are in the
local folder with the rest of the web application Dlls.

Could someone take a look at my error and shed some light on this?

I am passing an assembly name and class type to my "activator" method,
and when I do an Assembly.Load, I get the following exception:


General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: PLNXPL11
ExceptionManager.TimeStamp: 12/5/2003 10:12:48 AM
ExceptionManager.FullName:
Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1434.18346, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName:
/LM/W3SVC/1/Root/FrameworkAdminWeb-31-127151359460730013
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: PLNXPL11\ASPNET

1) Exception Information
*********************************************
Exception Type: Microsoft.ApplicationBlocks.ExceptionManagement.BaseApplicationException
MachineName: PLNXPL11
CreatedDateTime: 12/5/2003 10:12:48 AM
AppDomainName: /LM/W3SVC/1/Root/FrameworkAdminWeb-31-127151359460730013
ThreadIdentityName:
WindowsIdentityName: PLNXPL11\ASPNET
Message: The Web UI Manager could not start the desired task for the
graph "FrameworkAdmin_MainMenu", client "", user class "", mobile =
False
TargetSite: NULL
HelpLink: NULL
Source: NULL

2) Exception Information
*********************************************
Exception Type: System.IO.FileNotFoundException
Message: File or assembly name
GrahamMarcus.FrameworkAdminTool.BusinessLogic, or one of its
dependencies, was not found.
FileName: GrahamMarcus.FrameworkAdminTool.BusinessLogic
FusionLog: === Pre-bind state information ===
LOG: DisplayName = GrahamMarcus.FrameworkAdminTool.BusinessLogic
(Partial)
LOG: Appbase = file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin
Tool/Web App Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb
LOG: Initial PrivatePath = bin
Calling assembly : GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic,
Version=1.0.1434.18348, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private,
custom, partial, or location-based assembly bind).
LOG: Post-policy reference:
GrahamMarcus.FrameworkAdminTool.BusinessLogic
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.

TargetSite: System.Reflection.Assembly
nLoad(System.Reflection.AssemblyName, System.String, Boolean,
System.Security.Policy.Evidence, Boolean, System.Reflection.Assembly,
System.Threading.StackCrawlMark ByRef)
HelpLink: NULL
Source: mscorlib

StackTrace Information
*********************************************
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef, Boolean stringized, Evidence assemblySecurity,
StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIControlFactory.ActivateClass(String
strAssembly, String strTypeName, Object[] constructorArgs) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus.applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\gmwebuicontrolfactory.cs:line
210
at GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIControlFactory.CreateController(GMWebUIState&
rfTaskState, Object[] constructorArgs) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus.applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\gmwebuicontrolfactory.cs:line
165
at GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIManager.StartNewTask(String
strGraphName, String strClientName, String strUserClassName, String
strUserName, Boolean bIsMobilePage, NameValueCollection
nvcQueryStringData) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus.applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\gmwebuimanager.cs:line
136
 
R

Rick Strahl [MVP]

Sounds like you're using an assembly that's coming from the GAC (the
ExceptionApplicationBlock).

ASP.Net ASPX Pages don't see assemblies from the GAC unless they are
registered in the Compilation portion of the web.config file. If I recall
right even explicitly loading the assembly with an IMPORT doesn't work - it
needs the entry in the Config file.

No such problem exists with locally deployed assemblies as long as they are
in teh BIN directory...

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web


Brian said:
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 my Dlls are located give the ASPNET user full
control, and all Dlls used by the Assembly in question are in the
local folder with the rest of the web application Dlls.

Could someone take a look at my error and shed some light on this?

I am passing an assembly name and class type to my "activator" method,
and when I do an Assembly.Load, I get the following exception:


General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: PLNXPL11
ExceptionManager.TimeStamp: 12/5/2003 10:12:48 AM
ExceptionManager.FullName:
Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1434.18346, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName:
/LM/W3SVC/1/Root/FrameworkAdminWeb-31-127151359460730013
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: PLNXPL11\ASPNET

1) Exception Information
*********************************************
Exception Type: Microsoft.ApplicationBlocks.ExceptionManagement.BaseApplicationException
MachineName: PLNXPL11
CreatedDateTime: 12/5/2003 10:12:48 AM
AppDomainName: /LM/W3SVC/1/Root/FrameworkAdminWeb-31-127151359460730013
ThreadIdentityName:
WindowsIdentityName: PLNXPL11\ASPNET
Message: The Web UI Manager could not start the desired task for the
graph "FrameworkAdmin_MainMenu", client "", user class "", mobile =
False
TargetSite: NULL
HelpLink: NULL
Source: NULL

2) Exception Information
*********************************************
Exception Type: System.IO.FileNotFoundException
Message: File or assembly name
GrahamMarcus.FrameworkAdminTool.BusinessLogic, or one of its
dependencies, was not found.
FileName: GrahamMarcus.FrameworkAdminTool.BusinessLogic
FusionLog: === Pre-bind state information ===
LOG: DisplayName = GrahamMarcus.FrameworkAdminTool.BusinessLogic
(Partial)
LOG: Appbase = file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin
Tool/Web App Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb
LOG: Initial PrivatePath = bin
Calling assembly : GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic,
Version=1.0.1434.18348, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private,
custom, partial, or location-based assembly bind).
LOG: Post-policy reference:
GrahamMarcus.FrameworkAdminTool.BusinessLogic
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/frameworkadminweb/f844014c/eed817d7/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.
LOG: Attempting download of new URL
file:///C:/SourceSafeRoot/GrahamMarcus/Framework Admin Tool/Web App
Solution/GrahamMarcus.FrameworkAdminTool/FrameworkAdminWeb/bin/
GrahamMarcus.FrameworkAdminTool.BusinessLogic/
GrahamMarcus.FrameworkAdminTool.BusinessLogic.EXE.

TargetSite: System.Reflection.Assembly
nLoad(System.Reflection.AssemblyName, System.String, Boolean,
System.Security.Policy.Evidence, Boolean, System.Reflection.Assembly,
System.Threading.StackCrawlMark ByRef)
HelpLink: NULL
Source: mscorlib

StackTrace Information
*********************************************
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef, Boolean stringized, Evidence assemblySecurity,
StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIControlFactory.Act
ivateClass(String
strAssembly, String strTypeName, Object[] constructorArgs) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus
..applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\
gmwebuicontrolfactory.cs:line
GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIControlFactory.Cre
ateController(GMWebUIState&
rfTaskState, Object[] constructorArgs) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus
..applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\
gmwebuicontrolfactory.cs:line
GrahamMarcus.ApplicationBlocks.WebUI.BusinessLogic.GMWebUIManager.StartNewTa
sk(String
strGraphName, String strClientName, String strUserClassName, String
strUserName, Boolean bIsMobilePage, NameValueCollection
nvcQueryStringData) in
c:\sourcesaferoot\grahammarcus\applicationblocks\webui\solution\grahammarcus
..applicationblocks.webui\grahammarcus.applicationblocks.webui.businesslogic\
gmwebuimanager.cs:line
136
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top