I need to find a way to configure the manifest of a website in order to change the version number or add a redirection binding of a referenced assembly on production. When it comes to windows applications its pretty easy to find the configuration file attached to the exe file and do the desired changes, but i cant seem to find it in a web site (not a web application although i think its the same there). I checked the web config but the assembly reference was not specified there. Does anyone know where to look?
Related
I have a Web Application consuming a WebService. My web application has 2 projects - Startup and Other projects. I am able to build my solution and also run it without any problem in my local machine.
My Other project has a dll referenced named crypto. It is strongly named dll. Now I trying to publish my web app using File System. However it fails. Following are the errors.
The type or namespace name crypto could not be found (are you missing a using directive or an assembly reference)
From my output window
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "crypto". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
And finally it skips the Publish of website. Could anyone suggest me whats going on? Similarly I even had an WPF app and I was facing similar issue in Strongly Named dlls while creating Setup file. There I just put all the dlls in Special GAC folder and things worked. Here I am not sure.
Help would be appreciated.
Remove crypto dll from your projects, and add reference again , and be sure that crypto that you upload is exactly same as one you adding in reference. and then upload your project's dll again.
C#, VS2010, .Net 4.0, ASP.NET service under IIS or IIS Express.
I'm using a 3rd party assembly within my service. This 3rd party assembly has a .config file and is loaded dynamically as such:
Service -> MyAssembly1 -> Dynamically Load MyAssembly2 using Assembly.Load() -> 3rd Party Assembly with .config
I'm normally a C++ developer so this ASP.NET stuff is rather new to me.
I understand that with an ASP.NET application the assemblies it uses are "shadow-copied" to the Temporary ASP.NET Files folder.
Unfortunately when this 3rd party assembly is "shadow-copied" its .config file is not. So when it comes time to use this assembly it's failing because it cannot open its .config file.
From within my assembly I'm able to get the CodeBase for that assembly and load the .config file myself, but that doesn't help me since this 3rd party assembly needs to open the file itself.
If I manually copy the .config file to the shadow-copy location it works great.
Also, this 3rd party called the config file "assemblyname.config" instead of "assemblyname.dll.config".
The error I get is:
Unable to load configuration file: "\assemblyname.config".
When this 3rd party assembly is used in a non ASP.NET app (ie a normal Windows app) it works great since it doesn't do the shadow-copy stuff. Just uses the assembly and .config file directly from the exe location.
Any ideas? I've been unable to find a solution though I'd think this would be a rather common issue.
The main thing when loading assemblies is to see the path where the assembly is placed on disk and the page directory from which you are trying to load the assembly. So if you are adding the path for loading the assembly that does not mean that from the same path it will load the config file. Please try to put them both in the root folder of the app and see if the issue remains.
I have a vendor help develop a web project using VS.NET 2010. I got the delivered source codes from source code control system and tried to build it. There is an error message showing that one namespace is unknown, which is due to missing the reference of a .dll.
However, the vendor did add that reference into the web project and successfully built it in his own development environment. I know that for class library project, those reference information is saved in .csproj file. What about a file system web project? I did not see this information either in the .sln or the web application folder. Does anyone know where it is? I need to manually add the reference every time, which does not make any sense.
check the web.config file in the system.web/assemblies element
I have a COM-visible dll "COMInterface.dll" which is deployed into an existing application's folder. I have created a test harness that has verified the functionality of this dll.
However, when I try to use classic asp to call one of this dll's methods I get a message like the following:
MyCompany.MyProject.COMInterface (0x80070002)
Could not load file or assembly 'MyCompany.Framework, Version=2.6.4202.14897, >Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
My "COMInterface.dll" references a number of other dlls such as my company's standard framework, logging classes etc. "Framework" is one of these such dlls.
Where will the asp page be looking for these dlls? I am guessing that my harness worked because it was being run from the program folder whereas the asp page is within an IIS web site.
Do I need to use GAC registration here? I'm hoping not as there would be quite a few dlls I would need to deploy there and I am hoping to extend the application without having to impact the core installation on users' machines.
Thanks in advance of your questions and suggestions.
[EDIT]
I should point out that the object can be created fine. It's the location of the referenced dlls that are causing the problem.
When you use Regasm to register the dll you need to use the /Codebase switch to ensure the dll can be found.
As a general answer, you can use Fusion Log Viewer to determine what paths have been searched by the assembly binder.
See http://msdn.microsoft.com/en-us/library/e74a18c4.aspx for information on this tool.
Fusion Log Viewer will list all the paths probed by the binder. If you put your assembly into any of these paths it will be found. Whether any of these paths will be suitable for your scenario I'm not so sure.
I wrote a custom http module for a website in c# .NET. If i deploy the website to IIS I can add the module through the 'modules' section by picking the 'add managed module' option if I am looking at just the website level of IIS. However, I want to add this module to the whole server so that I can select it from the dropdown in 'add managed module' at the server level. I've looked around and It looks like I might need to install the assembly that contains my module to the GAC (we are in .net 3.5). This causes a lot of problems because we only have an app_code folder in this project and no AssemblyInfo.cs file so I can't figure out how to give the app_code.dll assembly a strong name. Furthermore, it seems like a bad idea to add the app_code dll to the GAC. So...
1) How can I add my module to the server level of IIS?
2) Can you help me figure out how to get the module registered in the GAC?
Thanks!
Separate the module from the web application. You'll need to move the module code into it's own project so that you can compile it as a DLL that you'll then strongname.