473,714 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

assembly cant access System.Xml


A cs file I compiled into an assembly dll is in my bin directory. In the cs
file I have a using statement for System.Xml
I compiled it using this command: csc /out:XmlContent. dll /t:library
XmlContent.cs

When I run my aspx page, which has a codebehind that instantiates the object
from in my assembly, I get the following error, anyone know why?
File or assembly name System.Xml, or one of its dependencies, was not found.
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.IO.FileN otFoundExceptio n: File or assembly name
System.Xml, or one of its dependencies, was not found.

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.

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Xml' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = System.Xml, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9
(Fully-specified)
LOG: Appbase = file:///D:/html/users/testorg/html
LOG: Initial PrivatePath = bin
Calling assembly : XmlContent, Version=0.0.0.0 , Culture=neutral ,
PublicKeyToken= null.
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(C:\WINNT\Micro soft.NET\Framew ork\v1.0.3705\a spnet.config).
LOG: Using machine configuration file from
C:\WINNT\Micros oft.NET\Framewo rk\v1.0.3705\co nfig\machine.co nfig.
LOG: Post-policy reference: System.Xml, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml.DLL.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml/System.Xml.DLL.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml.DLL.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml/System.Xml.DLL.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml.EXE.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml/System.Xml.EXE.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml.EXE.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml/System.Xml.EXE.
Stack Trace:

[FileNotFoundExc eption: File or assembly name System.Xml, or one of its
dependencies, was not found.]
Test.XmlContent ..ctor(String xmlFile) +0
MyCodeBehind.Pa ge_Load(Object Src, EventArgs E) +27
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +29
System.Web.UI.P age.ProcessRequ estMain() +724

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.0.370 5.288; ASP.NET
Version:1.0.370 5.288
Nov 18 '05 #1
3 2074
Hi Karl,
If you are building an assembly which references Microsoft's
System.Xml.dll you can specify the /reference:Syste m.Xml.dll switch when
invoking CSC.exe to resolve the issue.The compiler will find the
System.Xml.dll in the directory which contains the CLR which the compiler
itself is using to produce the assembly.
Additionl info: But at runtime System.dll will be loaded from the GAC .So
we have 2 copies of Microsoft'a assembly files.
Hope this helps.
Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com

"Karl Hungus" <nn*********@ho tmail.com> wrote in message
news:_3******** ********@twiste r.nyc.rr.com...

A cs file I compiled into an assembly dll is in my bin directory. In the cs file I have a using statement for System.Xml
I compiled it using this command: csc /out:XmlContent. dll /t:library
XmlContent.cs

When I run my aspx page, which has a codebehind that instantiates the object from in my assembly, I get the following error, anyone know why?
File or assembly name System.Xml, or one of its dependencies, was not found. 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.IO.FileN otFoundExceptio n: File or assembly name
System.Xml, or one of its dependencies, was not found.

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.

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Xml' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = System.Xml, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9
(Fully-specified)
LOG: Appbase = file:///D:/html/users/testorg/html
LOG: Initial PrivatePath = bin
Calling assembly : XmlContent, Version=0.0.0.0 , Culture=neutral ,
PublicKeyToken= null.
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(C:\WINNT\Micro soft.NET\Framew ork\v1.0.3705\a spnet.config).
LOG: Using machine configuration file from
C:\WINNT\Micros oft.NET\Framewo rk\v1.0.3705\co nfig\machine.co nfig.
LOG: Post-policy reference: System.Xml, Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml.DLL.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml/System.Xml.DLL.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml.DLL.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml/System.Xml.DLL.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml.EXE.
LOG: Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET
Files/root/d1dc28bf/188ad8f0/System.Xml/System.Xml.EXE.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml.EXE.
LOG: Attempting download of new URL
file:///D:/html/users/testorg/html/bin/System.Xml/System.Xml.EXE.
Stack Trace:

[FileNotFoundExc eption: File or assembly name System.Xml, or one of its
dependencies, was not found.]
Test.XmlContent ..ctor(String xmlFile) +0
MyCodeBehind.Pa ge_Load(Object Src, EventArgs E) +27
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +29
System.Web.UI.P age.ProcessRequ estMain() +724

-------------------------------------------------------------------------- -- ----
Version Information: Microsoft .NET Framework Version:1.0.370 5.288; ASP.NET Version:1.0.370 5.288

Nov 18 '05 #2

Hey Marshal,

Thanks for your reply. I tried that and it wasn't successful. I now believe
the problem is related to different framework versions. Locally I have v1.1
and on my server its v1.0

Im currently searching for ways to deal with this. Please let me know if you
have any solution.

Thanks,
Karl
"Marshal Antony" <do***********@ yahoo.com> wrote in message
news:up******** ******@tk2msftn gp13.phx.gbl...
Hi Karl,
If you are building an assembly which references Microsoft's
System.Xml.dll you can specify the /reference:Syste m.Xml.dll switch when
invoking CSC.exe to resolve the issue.The compiler will find the
System.Xml.dll in the directory which contains the CLR which the compiler
itself is using to produce the assembly.
Additionl info: But at runtime System.dll will be loaded from the GAC ..So we have 2 copies of Microsoft'a assembly files.
Hope this helps.
Regards,
Marshal Antony
.NET Developer
http://www.dotnetmarshal.com

Nov 18 '05 #3
Hi Karl,
If you are running v 1.0 and 1.1 side by side read the link below :
http://www.asp.net/faq/SideBySide.aspx

Once version 1.1 of the .NET Framework is installed,by default
all of the web applications will use
v 1.1 eventhough 1.0 exists.
It is useful for you to know about response files to make
your compilation easier.A response file is a text file
that contains a set of compiler command-line switches.Here is a link on
MSDN for that..

http://msdn.microsoft.com/library/de...sponsefile.asp

You might consider using Visual Studio .NET which will do
all the compilation for you.
It will increase your productivity dramatically in so many ways.

Hope this helps,
Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com


"Karl Hungus" <nn*********@ho tmail.com> wrote in message
news:cX******** *************** @twister.nyc.rr .com...

Hey Marshal,

Thanks for your reply. I tried that and it wasn't successful. I now believe the problem is related to different framework versions. Locally I have v1.1 and on my server its v1.0

Im currently searching for ways to deal with this. Please let me know if you have any solution.

Thanks,
Karl
"Marshal Antony" <do***********@ yahoo.com> wrote in message
news:up******** ******@tk2msftn gp13.phx.gbl...
Hi Karl,
If you are building an assembly which references Microsoft's
System.Xml.dll you can specify the /reference:Syste m.Xml.dll switch when
invoking CSC.exe to resolve the issue.The compiler will find the
System.Xml.dll in the directory which contains the CLR which the compiler itself is using to produce the assembly.
Additionl info: But at runtime System.dll will be loaded from the GAC

.So
we have 2 copies of Microsoft'a assembly files.
Hope this helps.
Regards,
Marshal Antony
.NET Developer
http://www.dotnetmarshal.com


Nov 18 '05 #4

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

Similar topics

26
10546
by: nospam | last post by:
Just wondering, What do you think the difference in performance would be between (1.) Compiled C# (2.) Compiled C++ (3.) and Assembly Language And how would the mix be if some if any of these languages had to hit against a SQL Server database
2
6404
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this to happen we had to change the context in which asp.net runs from machine to SYSTEM by modifying the machine.config file. Under Windows 2003 no matter how asp.net is set to run as either machine or system. I get the following error: ...
6
2248
by: SteveS | last post by:
Hello All. I have an asp.net application with 3 different assemblies. They are like this: 1) Assembly: PublicSite (This contains the website UI) Root namespace: PublicSite 2) Assembly: PublicSite.MyProfile.Business (This contains the business rules) Root namespace: PublicSite
1
1121
by: John Blair | last post by:
hi,I have the following code which gives an error in VB.Net when i run it that it cant find the assembly SimpleControlSamplesVB? any ideas how to resolve this error? Thanks for any help! J. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify
7
3126
by: Steve Richter | last post by:
I am attempting to use the IBM DB2Connection class in my .aspx web page. Using Visual Web Developer 2005 express, I cant figure out how to add a reference to a project. heck, I cant figure out how to open a project! so I am trying to use the @assembly directive to point directly to the assembly .DLL that contains the DB2 namespace:
2
1626
by: Ily | last post by:
Hi I have several versions of an assembly in the GAC My problem is that I want my clients (windows + web clients) to use a specific version of an assembly I can get this to work by using the <assemblyBinding> tag in the app.config
3
22146
by: Frank Uray | last post by:
Hi all I have a problem with loading a assembly ... I am trying to do the following: - I have a directory with a dll (assembly) in it (not the currect dir.) - I am trying to load this assembly, run a method in it, and than close it. The question would be: How is the right way to do it ????
1
2412
by: =?Utf-8?B?SmFzb24gUm9kbWFu?= | last post by:
I have a wierd problem in my application where any call to Assembly.GetFullName of the currently running assembly fails with an AccessViolationException. This only happens on windows vista, all editions. Running the appliction as an administrator does not seem to help. Any idea what would cause this? Does this have to do with code access security, or assembly signing? Here is a trace of one exception: System.TypeInitializationException:...
0
3958
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was getting the Access denied error. After checking different settings and googling I wasnt able to pinpoint the problem and as a temporary fix I decided to merge the two assemblies into one, my logic being no offending assembly no access denied...
0
9306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9168
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9009
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7942
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4715
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3155
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2103
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.