I am trying to load a shared component like DataAccess from GAC and not been
able to successfully get it working for my asp.net application. The dll is
loading from the GAC with correct version and I can verify it from Output
window of VS.Net IDE. I can change the policy and it works because I can see
the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the
application [from where it referenced by other components of the
application] I get FileNotFoundExc eption. This entirely defeats the purpose
of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the temporary
directory like the one below-
Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while the
file is already loaded from GAC? Am I missing something? I would appreciate
your comments.
Thanks,
Prodip Saha 6 1672
Have you set the "Copy Local" property of the assembly reference to False?
"Prodip Saha" <ps***@bear.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am trying to load a shared component like DataAccess from GAC and not been able to successfully get it working for my asp.net application. The dll is loading from the GAC with correct version and I can verify it from Output window of VS.Net IDE. I can change the policy and it works because I can see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while the file is already loaded from GAC? Am I missing something? I would appreciate your comments.
Thanks, Prodip Saha
you need to tell asp.net compiler where to find the assembly. in the
compilation section of the web config add:
<add assembly="<Asse mblyFileName>, Version=0.0.0.0 , Culture=neutral ,
PublicKeyToken= <keyvalue>" />
-- bruce (sqlwork.com)
"Prodip Saha" <ps***@bear.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am trying to load a shared component like DataAccess from GAC and not been able to successfully get it working for my asp.net application. The dll is loading from the GAC with correct version and I can verify it from Output window of VS.Net IDE. I can change the policy and it works because I can see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while the file is already loaded from GAC? Am I missing something? I would appreciate your comments.
Thanks, Prodip Saha
Just wanted to add one comment- application is built with a reference to
non-strong named version of the same dll. I mean the assembly menifest of
the ParentAssembly does not have a publickeytoken defined for the Dependent
assembly. Example-
//ildasm.exe>open >ParentAssembly .dll >manifest
..assembly extern System.Data
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
.ver 1:0:5000:0
}
..assembly extern Data.Access
{
.ver 1:0:1502:29024 //publickeytoken is not there because I
did not recompile the ParentAssembly. dll
}
I applied the strong name and installed in the GAC at a later time. Does
this make any difference?
Thanks,
Prodip
"Prodip Saha" <ps***@bear.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am trying to load a shared component like DataAccess from GAC and not
been able to successfully get it working for my asp.net application. The dll is loading from the GAC with correct version and I can verify it from Output window of VS.Net IDE. I can change the policy and it works because I can
see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the
purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the
temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while the file is already loaded from GAC? Am I missing something? I would
appreciate your comments.
Thanks, Prodip Saha
Scott,
Yes, Local Copy is set to False.
Thanks,
Prodip
"Scott M." <s-***@nospam.nosp am> wrote in message
news:OY******** ******@TK2MSFTN GP12.phx.gbl... Have you set the "Copy Local" property of the assembly reference to False?
"Prodip Saha" <ps***@bear.com > wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..I am trying to load a shared component like DataAccess from GAC and not been able to successfully get it working for my asp.net application. The dll
is loading from the GAC with correct version and I can verify it from
Output window of VS.Net IDE. I can change the policy and it works because I can see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while
the file is already loaded from GAC? Am I missing something? I would appreciate your comments.
Thanks, Prodip Saha
Bruce,
I have tried it but it did not help-
<assemblies>
<add
assembly="Data. Access,Version= 1.0.1902.19083, Culture=neutral ,PublicKeyToken =
afe57206630e2fs d" />
<add
assembly="Inter face.Data.Acces s,Version=1.0.1 902.19082,Cultu re=neutral,Publ i
cKeyToken=afe57 206630e2fsd" />
</assemblies>
Will be taking your answer. Thanks.
Prodip
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:Oy******** ******@TK2MSFTN GP12.phx.gbl... you need to tell asp.net compiler where to find the assembly. in the compilation section of the web config add:
<add assembly="<Asse mblyFileName>, Version=0.0.0.0 , Culture=neutral , PublicKeyToken= <keyvalue>" />
-- bruce (sqlwork.com)
"Prodip Saha" <ps***@bear.com > wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..I am trying to load a shared component like DataAccess from GAC and not been able to successfully get it working for my asp.net application. The dll
is loading from the GAC with correct version and I can verify it from
Output window of VS.Net IDE. I can change the policy and it works because I can see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while
the file is already loaded from GAC? Am I missing something? I would appreciate your comments.
Thanks, Prodip Saha
Just to let you all know that I got it resolved. My fear came true. I had to
rebuild all the components (used by the app) with the strong named version
of the dataaccess dll and all works fine. I don't have to copy dll in the
bin directory anymore. The dll can be in the bin directory during the
development time just for adding references. However, the framework will use
the one from the GAC.
Thanks you all for contributing to this thread.
Prodip
"Prodip Saha" <ps***@bear.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am trying to load a shared component like DataAccess from GAC and not
been able to successfully get it working for my asp.net application. The dll is loading from the GAC with correct version and I can verify it from Output window of VS.Net IDE. I can change the policy and it works because I can
see the oldversion is redirected to newVersion.
The problem is- unless I copy the dll in the bin directory of the application [from where it referenced by other components of the application] I get FileNotFoundExc eption. This entirely defeats the
purpose of have the dll in the GAC.
I have tried the codebase but asp.net always probes the dll in the
temporary directory like the one below- Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/iisvirtualpathn ame/c6b755e3/7450c22c/DataAccess.DLL ...etc.
So, my question is why am I getting the file not found exception while the file is already loaded from GAC? Am I missing something? I would
appreciate your comments.
Thanks, Prodip Saha
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: id |
last post by:
Hi all,
I was wondering if someone can shed some insight into this problem i'm
having. I am decent with C++ but very new to managed C++.
I have a managed c++ class library which wraps some unmanaged c++ code. At
the moment i'm using a test harness which is a C++.NET Windows Forms
Application project. (I have also tried writing the Test harness in VB.NET
and C# but got the same error).
|
by: ulf |
last post by:
Hello,
After I got a FileNotFoundException in my real life CSharp code, I nailed it
down to the following line:
System.EnterpriseServices.ResourcePool rp = new
System.EnterpriseServices.ResourcePool(null);
The exception I get for this line is
System.IO.FileNotFoundException: The specified module could not be found.
|
by: Chris Aitchison |
last post by:
Hello,
I am attempting to have a class that I have written serialize so that it can
be both passed as a parameter or return value for a webservice, and also be
serialized to disk using the XmlSerializer.
When this class is decalred as a return value for a WebMethod in an XML
WebService I receive the following exception:
System.IO.FileNotFoundException: File or assembly name rexz5r1o.dll, or one
|
by: Nick |
last post by:
Hello,
Let me explain my situation. There is an application in C++ (that I didn't
write) that needs to call a C# DLL. One option, I believe, would be to
compile the app with the clr switch. Rather than do that first the other
developer wondered if I could create an intermediate managed code DLL that
would call my C# code.
So, I created a C++ DLL that exports a function and compiled it with the clr
switch. It calls my C# code. To test...
|
by: Stephen Witter |
last post by:
I had previously posted this on the security ng, but haven't had a hit so I
was wondering if someone here would be willing to take a stab. I am trying
to copy a file to a network drive. I can do it on the web server but not
from a client. Here is the code:
Dim impersonationContext As
System.Security.Principal.WindowsImpersonationContext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity
currentWindowsIdentity...
| |
by: Chris Aitchison |
last post by:
I Keep on getting this error on a production server, but never seem to manage
reproducing it on any test environment.
I just can't get my head around it, any ideas?
Inner Exception
---------------
Type : System.IO.FileNotFoundException, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : C:\WebSites\RNBS\WebUI\wwwroot\retailOffice\loans.aspx
|
by: jjlagtap |
last post by:
Hey everyone
When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer. When someone else uses the web app and tries to open a file using the remote server the error below happens.
any help?
**Code**
C# - filepath is a valid file name which is passed via the form.
System.IO.BinaryReader br = new...
|
by: bbindae |
last post by:
I am trying to check whether XmlTextReader reads the xml file
successfully or not.
MSDN says that XmlTextReader raise the FileNotFoundException when it
cannot find the file to read.
Here is the source code I wrote.
string fileName = "thisfileneverexist.xml";
XmlTextReader xmlReader = null;
|
by: tom |
last post by:
Hello.
With my Installerproject I call my dll in custom action.
This works with to local hard drives perfectly. However,
if the is set to a network drive, I retrieve
the error message "error 1001 ... ...
system.io.fileNotFoundException .the file:///z:\passinstall.dll or a
dependicies was not found.
knows someone a tipp?
Thanks for your help.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |