473,378 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

question about Temporary ASP.NET Files folder

Roy
My dll file is copied to the
"%windir%\Microsoft.NET\Framework\{version}Tempora ry ASP.NET Files" folder
when I compile my asp.net project. When I run the application. The dll under
this folder is loaded, not the one under bin folder. Why is that? How can I
load the one under bin folder?

Nov 18 '05 #1
5 4417
I believe, and hopefully someone will correct me if I'm wrong, the dll's in
your bin folder are those of your .cs/.vb files (codebehind, custom
classes..) as well are resource files and anything else embedded. The .dll
in the temp folder is created dynamically for the aspx files (the ones with
all the html in them). you can't change this behaviour. In 2.0, you'll
have 4 different types of compilation, one of which is what you want.

Karl

"Roy" <Ro*@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
My dll file is copied to the
"%windir%\Microsoft.NET\Framework\{version}Tempora ry ASP.NET Files" folder
when I compile my asp.net project. When I run the application. The dll under this folder is loaded, not the one under bin folder. Why is that? How can I load the one under bin folder?

Nov 18 '05 #2
Hi Roy:

I believe the ASP.NET team was trying to reduce the number of
scenarios where you have to restart the web application.
If ASP.NET loaded the DLL from the bin folder, the DLL would become
locked. The only way to update the DLL would be to stop the web
application to release the lock and then copy in the new DLL.

The way it works now is ASP.NET makes a shadow copy of the DLLs in the
bin directory. If you slide in a new version ASP.NET will detect the
new file, shadow copy and load it up.

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 06:07:02 -0700, Roy
<Ro*@discussions.microsoft.com> wrote:
My dll file is copied to the
"%windir%\Microsoft.NET\Framework\{version}Tempor ary ASP.NET Files" folder
when I compile my asp.net project. When I run the application. The dll under
this folder is loaded, not the one under bin folder. Why is that? How can I
load the one under bin folder?


Nov 18 '05 #3
Roy
I can understand the reason you gave. But it confuses me more since it
complecates the deployment. I have a subfolder with some resource files under
it. This folder is relative to the bin folder, which means I can get the
folder dynamically from my assembly dll under bin folder. If the dll loaded
is the one under temporary folder, I cannot use XCopy to deploy my project.
How can I resolve it?

"Scott Allen" wrote:
Hi Roy:

I believe the ASP.NET team was trying to reduce the number of
scenarios where you have to restart the web application.
If ASP.NET loaded the DLL from the bin folder, the DLL would become
locked. The only way to update the DLL would be to stop the web
application to release the lock and then copy in the new DLL.

The way it works now is ASP.NET makes a shadow copy of the DLLs in the
bin directory. If you slide in a new version ASP.NET will detect the
new file, shadow copy and load it up.

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 06:07:02 -0700, Roy
<Ro*@discussions.microsoft.com> wrote:
My dll file is copied to the
"%windir%\Microsoft.NET\Framework\{version}Tempor ary ASP.NET Files" folder
when I compile my asp.net project. When I run the application. The dll under
this folder is loaded, not the one under bin folder. Why is that? How can I
load the one under bin folder?


Nov 18 '05 #4
Hi Roy:

One alternative is to use a 'satellite assembly' instead of a resource
file. Here is some more info:

http://samples.gotdotnet.com/quickst...aspx#satellite

HTH,

--
Scott
http://www.OdeToCode.com
On Thu, 19 Aug 2004 07:55:02 -0700, Roy
<Ro*@discussions.microsoft.com> wrote:
I can understand the reason you gave. But it confuses me more since it
complecates the deployment. I have a subfolder with some resource files under
it. This folder is relative to the bin folder, which means I can get the
folder dynamically from my assembly dll under bin folder. If the dll loaded
is the one under temporary folder, I cannot use XCopy to deploy my project.
How can I resolve it?

"Scott Allen" wrote:
Hi Roy:

I believe the ASP.NET team was trying to reduce the number of
scenarios where you have to restart the web application.
If ASP.NET loaded the DLL from the bin folder, the DLL would become
locked. The only way to update the DLL would be to stop the web
application to release the lock and then copy in the new DLL.

The way it works now is ASP.NET makes a shadow copy of the DLLs in the
bin directory. If you slide in a new version ASP.NET will detect the
new file, shadow copy and load it up.

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 06:07:02 -0700, Roy
<Ro*@discussions.microsoft.com> wrote:
>My dll file is copied to the
>"%windir%\Microsoft.NET\Framework\{version}Tempor ary ASP.NET Files" folder
>when I compile my asp.net project. When I run the application. The dll under
>this folder is loaded, not the one under bin folder. Why is that? How can I
>load the one under bin folder?



Nov 18 '05 #5
Hi Roy:

Ah! You could just use the MapPath method to get the path to the file.
.. You pass MapPath a virtual path and it will return the physical path
to a file.

If I put:
string s = Server.MapPath("bin/a.bmp");

My result is:

"E:\dev\xprmnt\aspnet\Calendar\bin\a.bmp"
Note: you can also use HttpContext.Current.Server.MapPath if you are
in a class library outside of a web form.

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 19 Aug 2004 10:35:03 -0700, Roy
<Ro*@discussions.microsoft.com> wrote:
I am sorry I should not use the name "resource files". Actually, they are
picture files such as bmp files. I need to add new files or remove files
frequently. Apparently satellite assembly is not appropriate since it needs
to be compiled. Any other ways to handle this issue?
Thanks.
Roy

"Scott Allen" wrote:


Nov 18 '05 #6

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

Similar topics

5
by: Rosa | last post by:
Hi, I'm trying to clear the TIF on Windows XP programmatically with the below code. This code works fine on any folder but the TIF. For some reason the atEnd() statements always defaults to true...
3
by: Jim | last post by:
Is it possible to read the Temporary Internet Files folder using C#? I'm messing with FileIO (newbie here) and everything seems to work fine until I try to read the list of files in this Temporary...
3
by: Rajiv Das | last post by:
VS 2003, XP SP2 ------------------------------------------------------------ DirectoryInfo temporary = new DirectoryInfo( Environment.GetFolderPath(Environment.SpecialFolder.InternetCache));...
2
by: Juleke | last post by:
Hello, For some test, I have setup one computer with Win 2003 Standard + IIS + Active Directory My problem is Access to the path "c:\windows\microsoft.NET\framework\v1.1.4322\temporary ASP.NET...
2
by: Amelyan | last post by:
VisualStudio is trying to copy older version of Company.Interface.dll into runtime directory from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ and I get this warning. ...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
4
by: Anbu | last post by:
Hi all, I have developed an application in VS .NET 2003 (framework 1.1) on a XP platform. It is working fine in that PC. Now, I setup new PC with same configuration for another develper....
2
by: Chris Newby | last post by:
After googling this I got lots of information and tried a few different things. However pages for a particular site are still consistantly failing with "Access Denied to C:\ ... \Temporary Asp.Net...
5
by: rogersw8n | last post by:
Some how, some way the account that creates folders under Temporary Internet files has been changed to a domain account for VS 2003 and VS 2005. I recently installed VS 2005. All seemed to be ok...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.