Compile asp.net web site and certain references are not being copied to Temporary ASP.NET Files Folder - asp.net

Scenerio: I have an asp.net website that I am compiling successfully but keep getting an error in the browser saying that it can not find a referenced dll in the solution. I checked the directory in the Temporary ASP.NET File location and all of my referenced dll's are there except for the one it is failing to retrieve. I manually added the location it was looking for and the site worked.
The dll is referenced in code so it should have been moved to the temp folder. Does anyone have any idea why this would happen? I checked the properties on the referenced dll and copy local is set to true so it should be moved to the output directory.

Right click on the DLLs in your References/Bin directory in your project and look at the Copy Local property. Make sure they are set to True.

After hours of searching google and finding nothing, I decided to take a look at the actual properties of the dll file. To my surprise the issue ended up being permissions. For some reason the one dll that was beating me up all day needed correct permissions to be moved to the output folder. ughhh.

When you say "referenced in code" do you mean it's listed in the project file's Reference section? Or do you mean you are manually referring/naming it in your source code?
Have you tried this in your web.config (or higher up the config chain?)
<hostingEnvironment shadowCopyBinAssemblies="false" />
Where exactly are you expecting it to be copied? What is the path the error message is reporting?

Related

ASP.net This is a marker file generated by the precompilation tool, and should not be deleted

I am currently getting this when visiting my http:// websitehere.com/excelData.aspx page:
This is a marker file generated by the precompilation tool, and should not be deleted!
The file system directory on the server looks like this:
--mainDir
|--excelData.aspx
|--PrecompiledApp.config
|--Web.config
|--bin
|--App_Web_cuydkh1j.dll
|--exceldata.aspx.cdcab7d2.compiled
Not sure what I need to add/remove in order for it to display my page without that precompilation tool text on it.
The IIS server is version 6.1
One of the reasons for this problem is the file PrecompiledApp.config is missing from the root of your site (this file is generated by the publishing wizard).
Hope this help others.
Problem:
When you upload the web application, sometimes the most important files in the bin folder (e.g., the .dll files) will not upload correctly.
Solution:
Re-upload the bin folder. Remember to overwrite.
Make sure the site is configured as an application on IIS

ASP web.config exclude bin folder on publishing

It is my first experience with asp.net. I have some large dll in my bin that never change and I would like to exclude them from publishing every time I make small changes to the pages. I know I need to add a section in my web.config but I do not know where and what to write in it to exclude the bin folder.
I already looked at few similar question on SO but none of them are really giving a clear answer to my need.
This is my web.config in which I have already added successfully the connection string for the production server and the error mode to have some feedback about errors during deployement phase.
Few lines of code to direct me on what to change will be appreciated.
To exclude any file from being copied; you can control this behavior by adding that file to your project; Once you add that file, you will see it in your Solution Explorer Right click on file and choose Properties . On the property page there is a Property called 'Copy to Output Directory' use that.

running asp.net solution containing multiple projects in iis

I have an asp.net solution containing more than 1 projects which are inter-related and each project have different configurations in web.config file. The whole solution is kept in a folder, lets say 'X'. I want to run the solution in iis. For that, I have created a virtual path in iis of 'X', converted the folder 'X' to an application, and created a web.config file in the root folder that is 'X'.
When I am viewing one of the project' default page in browser, it shows an error of
Parser Error Message: Could not load type 'app1.SiteMaster'
I have already compiled the solution.
Please help... Am i missing some settings...
It sounds like the application can't find the master page. Assuming that your projects share the same master page, you probably need to update the path to the master page to the relative path from the root.

ASP.NET website still looking for old name of renamed referenced assembly

I have a solution with a website and a class library. I have renamed the class library project from Insight_WebControls to Insight.WebControls. I have also renamed the assembly it produces in its properties.
I have removed from the website's references the old class library and added the new.
However, when I try to build the website, I get the error 'Could not load file or assembly 'Insight_WebControls' or one of its dependencies. The system cannot find the file specified.' There is a dll called 'Insight.WebControls' in the bin folder.
Clearly some part of the website is still looking for the old filename. Can anyone tell me how to point it to Insight.WebControls.dll instead?
Thanks
David
Just as a couple of shots in the dark:
Have you looked inside the web.config to see if there is any reference to the old file name in there?
If that turns up a blank then try opening up the project file for the web site and do a similar search.

How to tell what page a dll refers to in precompiled ASP.NET site

I'm using a pre-compiled ASP.NET 2.0 site (i.e., copied to the server using the "Build->Publish Web Site" feature in Visual Studio 2005). I catch and log all errors which are usually quite detailed, but lately I've been getting the following error with no other information:
Could not load the assembly
'App-Web-rp2eml-j'. Make sure that it
is compiled before accessing the page.
Now, that 'App-Web-rp2eml-j' file should be a dll in my bin folder which was created for the pre-compiled site. My main question is, how do I tell what aspx page is looking for that dll? I've tried re-publishing the site, and even completely wiping out the site and re-publishing, but the problem does not go away.
When Googling the problem, most answers about this error message center around making sure IIS is set up to use ASP.NET 2.0 instead of 1.1. This is not my problem.
NOTE 1: The site all seems to work, but obviously there is (at least) one page that is broken which I cannot find.
NOTE 2: The file name above should have underscores instead of dashes, but SO's markup is changing the text between the underscores to italics.
Does the mentioned dll exist in your bin directory? You italicized that portion so I suspect that it doesn't. That could mean that the error is referring to a dll in the Temporary files folder.
This problem can occur if one or more of the dlls in the ASP.NET Temporary files folder are corrupted. Sometimes ASP.NET does not refresh files here if there are no changes in the dll residing in the virtual directory. It happens every once in a while on my server.
My solution is as follows:
Stop IIS services on the server for a minute or so.
Navigate to the ASP.NET Temporary files folder (usually located at "%windir%\Microsoft.NET\Framework\\Temporary ASP.NET Files\MyApplicationName") and clear all files within the folder.
Publish and upload my site to the configured virtual directory.
Restart IIS and other services.
This simple 4-step process has worked very well for me in the past and may be worth a try for you.
To answer your basic question, however, there are two ways to "reverse engineer" a dll:
Load it up in ILDASM and check the contained classes.
Use Reflector to save all the class files contained within the dll to a folder.
However, I doubt if this will solve your problem because each dll could contain many class files and you would not have a clue as to "which ASPX page is looking for that dll".
Maybe you can catch more detailed information on the error with the Global.asax event Application_OnError, so you can watch the stack Trace.

Resources