Configuration :: How To Reference An Assembly Manually
Oct 28, 2010
I downloaded the trial version of abcpdf, which is absolutely fantastic!
Anyway, real simple, you just need to reference the .dll and off you go...
So, I got my code working, but when I moved to production server I hit a wall.
It definitely has to do with the .dll because when I comment out the pdf sub routine, the code executes and completes all other tasks. When I uncomment, It's not working.
The trouble is, on my server I don't have the full version of VS, so I am unable to add a reference, which I presume takes care of the web.config settings? I manually dropped the .dll into the bin folder and I added the assembly line into web.config, but, as I don't have the above, I am not sure if the token key is correct.
To test this, I uploaded the working .dll file to my server, which I assumed the key is associated with, but still the same.
how to either get the correct key and/or how to reference an assembly manually? Is there something I have missed?
View 2 Replies
Similar Messages:
Jul 5, 2010
Before using any class in your website project/page we have to add it's assembly reference to our project. Right?
Now, when I am using SmtpClient class from System.Net assembly after adding the System.Net.Mail namespace in namespace node of application's web.config file but without adding assembly reference to the project, it still accepting and running the code. Why?
I enquired the machine's web.config file located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG but didnt find assembly reference for System.Net there also.
So bit confused how it is working and where the assembly reference has been added and how?
View 1 Replies
May 2, 2010
I'm getting following warning
Assembly generation -- Referenced assembly 'System.Web.dll' targets a different processor
What does this mean and how do I fix this?
View 1 Replies
Jan 7, 2010
When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.
Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.
View 3 Replies
Nov 24, 2010
My project references Library1.dll and Library2.dll. Library2.dll has a dependency on Library1.dll, but it was compiled to reference it by a different name, Library1.Net40.dll. there an nice way tell my application to redirect all references for Library1.Net40.dll to resolve to Library1.dll? Maybe something similar to the way you can redirect versions using a <bindingRedirect>
I've got a solution that handles the AppDomain.AssemblyResolve event, but it's a bit of a hack and am hoping there's a better way to do this.
View 1 Replies
Jan 13, 2011
I need to add reference to 'System.XML.dll' assembly into web.config (in order to try solution for problem, mentioned here: Problem with Extension method: IXmlLineInfo).I've tried to add the following line into "assemblies" section:
<add assembly="System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"/>
View 2 Replies
Feb 15, 2010
Is it possible to reference a .NET assembly from ColdFusion? If so, how can I accomplish this? I am not a ColdFusion developer by any means.
View 1 Replies
Jul 7, 2010
Before using any class in your website project/page we have to add it's assembly reference to our project. Right?
Now, when I am using SmtpClient class from System.Net assembly after adding the System.Net.Mail namespace in namespace node of application's web.config file but without adding assembly reference to the project it still accepting and running the code. Why?
I enquired the machine's web.config file located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG but didnt find any assembly reference for System.Net.
how it is working and where the assembly reference has been added and how?
View 4 Replies
Dec 5, 2010
I posted a question about how to save the result of an SQL command to a variable and was told that the execute scalar method should be used, however I can't use it, I'm using the System.Data.SQLClient reference but still not finding it
View 3 Replies
Mar 23, 2010
I have trouble getting a custom ObjectDataSource for an asp:ListView control to work. I have the class for the DataSource in the App_Code directory of the web application (as required by the asp:ListView control).
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Web;
using System.DirectoryServices;........
As soon as I add using System.DirectoryServices; the page crashes with this message:
Compiler Error Message: CS0234: The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?) Without the usage of System.DirectoryServices the page loads without problems.
The reference is there, it is working in classes outside the App_Code directory.
View 1 Replies
Apr 14, 2010
If I have a reference in my project to System.Data.Linq in an MVC application compiled against 3.5 I can use Linq to SQL generated entity objects in my views and access the foreign key entity sets. If I try and do the same thing in 4.0 I get the error messageCompiler Error Message: CS0012: The type 'System.Data.Linq.EntitySet`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
View 1 Replies
Jan 21, 2011
I recently moved my class based on IUnityResolver from the mvc3 project (where I tested it), to a class library (which references all five Unity dll's. I'm getting the following error, why? Are there other dependencies for which I am unaware?The type or namespace name 'IUnityContainer'...are you missing an assembly or reference?
View 3 Replies
Apr 23, 2010
I have an ASP.NET project and I want to use some AjaxToolKit Extenders on my pages.
The site is created in VS2010, set to Framework 4.0.
This is what I did:
1) Add reference "AjaxToolKit.dll" to my project.
2) Add to the toolbar the same file for the controls
3) Add "ToolkitScriptManager" to the page source.
This adds the declaration to the source as well.
Right after this I get the following error:
Reference required to assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the base class 'System.Web.UI.ScriptManager'. Add one to your project.
View 3 Replies
Oct 19, 2010
tell me the way to solved my problem to looking for a long time.
My System Info:
OS: Windows 7 - Ultimate - 64bit
VS: Visual Studio 2008 - Professional (and problem with my VS2010 installed)
Problem:
I have a small project and build it to library .dll file with some function util.
From an other website (with diffirence solution). I added reference the .dll before to website.
In website, I declaration to using the function in library (dll file before). But I found error:
Error 1 Type 'LibraryName' is not defined.
And in VS2010 the problem is same.
But, run website on an other computer, it work normally.
View 2 Replies
Mar 8, 2011
In development I installed "ODAC Entity Framework and LINQ Beta (11.2.0.2.30)" so that we could have a 32 bit version of Oracle.DataAccess for ODP.Net. In Visual Studio 2010 (on Windows Server 2008 R2) I made a reference to:
C:Oracleodp.netin4Oracle.DataAccess.dll.This adds: <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" /> to the assembly in the web.config.
We set the AppPool to Enable 32 bit applications and everything works great. For anyone who doesn't know the story here, we do this because Visual Studio 2010 runs in 32 bit so you need the 32 bit ODAC/ODP.net components to get a development environment running. I then publish the files and move to a 64 bit machine.
I downloaded the "ODAC112021Xcopy_x64.zip" Then ran: install.bat odp.net4 c:oracle odac and I can see the Oracle.DataAccess.dll file at: C:Oracleodp.netin4Oracle.DataAccess.dll. Then added c:oracle;c:oraclein;c:oraclein4 to the System Path.
At this point I would think I just replace the version and PulbicKeyToken in: <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
on production to the versioin installed on prod. So first thing I do is just remove that line on production to see what error I will get. And I still get the same error:
System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Actually this is if I move the new dll into the applicaitons bin directory. If I remove the dll from the directory I get: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
So I put the line back in.
I right click on on the new Oracle.DataAccess.dll and click properties. In the details tab I see verion is 4.112.2.0. That makes sense. The 64 bit XCopy version is an earlier build then the 32 bit Beta that comes with Entity Framework and LINQ(Version=4.112.2.30).
So on production I change the Version attribute to: 4.112.2.0. But now I get the same error: System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
(This is with the new dll back in the web app's bin directory as is the rest of the thread).
It's still looking for the same version of the assembly. Why is it doing that? The web.config has a connection string with the ODP.Net provider type (Oracle.DataAccess.Client). Which would take from the assembly reference. It should not care what the version number is. Could there be something in code somewhere that is specifically looking for the old dev box version? Just what is the way to make it use the new assembly?
I would think the system would just know where to find the new dll. Just as in development the add reference dialog knew that the dll was in c:oracle... rather then c:program files(x86)... like out-of-the-box Microsoft assemblies.
View 2 Replies
Aug 31, 2010
Currently, when I want to use Microsoft Chart Controls on a website, I need to add the following onto every aspx page where I want to use it:
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
Is there any way to move this to the web.config file, so that I don't have to put it on every page ?
View 2 Replies
Mar 30, 2011
I'm aware of the following two different types of web projects in Visual Studio 2008:Website projectWeb application projectA web application project can reference a signed assembly as long as the web application's assembly is also signed with the same key. However, this doesn't work with the website project because there is no place to sign an assembly. I think this is because the assembly is compiled dynamically on the server?
Anyway, is it possible to get the website project working with this signed assembly? Or will I have to convert this website project into a web application project?Edit:The following situation has required me to ask for clarification in this matter:I have a class library that is being referenced by several other projects in my solution in Visual Studio. One of the projects is a windows application that will be deployed to specific external users. In order to make sure that the application is using the correct assembly and to also prevent others from using the assembly (I am aware of the limitations with respect to its effectiveness), all assemblies have been signed and all the classes in the library are declared as Friend (internal).
The website project doesn't seem to have a way for me to sign its assembly and I get the following message when attempting to use anything from the library: "CLASS is not assessable in this context because it is 'Friend'", which is to be expected.The following attributes are inside the AssemblyInfo.vb file in my class library project:
<Assembly: InternalsVisibleTo("OtherProject1, PublicKey=AAA...")>
<Assembly: InternalsVisibleTo("OtherProject2, PublicKey=AAA...")>
...
My Conclusion:Looks like the cleanest way to do this would be to convert the website into a web application but this would require a bit of time to do since our site is pretty fleshed out already and as pointed out in other discussions, can be quite a pain to do. Going forward, I think creating a web application in the first place may have been a better idea and much more flexible for future development.
View 3 Replies
Nov 22, 2013
I have downloaded ajax toolkit fromĀ URL....
When I am using control it gives error unable to reference extender assembly "AjaxToolkit control" version =4.1.7.1105 , culture = netural , publickey token=28f01b0e84b6d53e
And when running aspx page it gives unable to get property ui of undifeined or null reference..how it can be removed..
View 1 Replies
Nov 16, 2012
I have adeed a dll file on my project and it's working fine with local system. but when i uploaded it on hosting webspace it's displaying error. "assembly refference is missing" i have alreday added bin folder there. So how to add bin folder on hosting spaces.
View 1 Replies
Jul 26, 2010
I want to insitate a class instance in the session start of the application. code below
if (Session["user"] != null)
Session["user"] = new user();
I have created the "user" class as a separte dll and referenced and imported the namespace.But still i get 'are u missing assembly reference' it is not problem in 1.1 but seems has a problem in 2.0
View 2 Replies
Feb 18, 2010
I have recently discovered that I am affected by this bug http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71515.html
Well,at http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71529.html they say the work around is to create a global policy assembly and redirect the assemblies that way since it is not read from the web.config.
How do you actually do what they describe there? There is a huge documentation gap in that area with Mono.Also,I can't just recompile the assembly to use the new Mono assembly versions because the assembly is closed source.(but it does work with Mono.)
View 1 Replies
Apr 24, 2010
I have strange problem with missing assembly of my application after IIS restart. My application is installed correctly to IIS 7.5 (windows 7) and works fineAfterwards I make a restart of IIS serverNow my application is not working properly, some classes (assemblies) are missing. I've insterted a code to my application that writes all avaible assemblies into my log file (see code below ) and really a few assemblies are missing[Code]....
Restart of IIS or even restart of windows is not enoughThe workaround is to make some change in web.config or to rewrite some *.dll by the same dll library (in order to force IIS to reload whole application)afterwards it works fine again (till next restart of IIS) for better understanding I've recorded a video for you [URL] Do you have any idea how to solve it? or what what to check? (My application is based on ASP.NET and I'm using ported version of Jade framework (framework originally created in Java).) This problem is related to another problem on this forum [URL]
View 4 Replies
Jul 28, 2010
I built an assembly, and that assembly refereces a DLL in my bin folder (lets call it Bob.dll). so multiple users may have different versions of Bob.dll...but by and large they all function the same.
However when my assembly gets dumped into the bin folder, it wants the version it was compiled against.
Is there a way to compile a reference such that it'll just be happy with ANY version?
I know it can be done with assembly binding in the webconfig, but I dont want users to have to do that.
View 3 Replies
Oct 21, 2010
When I drag/drop a Chart or ReportViewer control onto my page the web.config updates with said assemblies however my website fails to load. Removing the controls and assembly tags successfully starts the website however I cannot seem to understand why the website has issues when the Chart, for instance, is loaded.
The site is live within an intranet space which was originally created in .asp however the .aspx pages I create do work with other controls such as gridviews etc.It seems altering the web.config causes issues but I just want to know how I can get the chart etc controls working?
View 1 Replies
Apr 27, 2010
I have writen a simple asp.net App to display stats in the call center I work in. I was working fine until yesterday afternoon when i started getting the following error
Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. The server is only running windows 2000 teminal so can only run .net 2.0. I am using Visual Studio 2008 Express to write the code and have set the Target Framework to .NET Framework 2.0 under the Properties page and hit the F5 key and it ran fine.
View 2 Replies