473,320 Members | 1,961 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,320 software developers and data experts.

Compiling ASP.Net app fails to replace DLL

Every time I build, I have to delete the DLL from the bin directory or the debugger will run the old DLL file. (actually, happens on release versions too). I asked about this earlier, too. Thoughts

Nov 18 '05 #1
11 1087
one thought, this may be a permissions issue:

make sure you have delete (read/write) permissions on the directory AND to
the temporary internet iis folders which hold these references.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
<bi**@sempf.net.nospam> wrote in message
news:9F**********************************@microsof t.com...
Every time I build, I have to delete the DLL from the bin directory or the debugger will run the old DLL file. (actually, happens on release versions
too). I asked about this earlier, too. Thoughts?

Nov 18 '05 #2
Hi,
Thanks for posting in the community!
From your description, you found that the assembly of a certain web
application can't be replaced with new one when build the web application
in VS.NET. And you need to manually remove the dll file in the bin
directory folder,yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my experience, I agree with Alvin that this problem is likely to
be a permission issue, would you please have a try and confirm the
following items:
1. Have you tried creating a simple winform application to see whether the
problem exists so that we can confirm whether the problem is concerned to
IIS or not?

2. Try creating a new web application, first make it with a simple page and
build it to see whether the problem remains? If not, then try add some
similiar code or reference to what in the former application which suffer
this problem, then build it to see whether the problem remains.

3. Is there anyother things may refer the dll when building the applicaion
so that it can't be overwrited? Or there anything particular in the web
application's code or some certain external components it has refered?

Please check out the preceding items. If you have any questions or if you
got any new findings, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3
Thanks for replying, Alvin. I do have admin rights on the server, and that role seems to have full permissions on the folders in question.

----- Alvin Bruney [MVP] wrote: -----

one thought, this may be a permissions issue:

make sure you have delete (read/write) permissions on the directory AND to
the temporary internet iis folders which hold these references.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
<bi**@sempf.net.nospam> wrote in message
news:9F**********************************@microsof t.com...
Every time I build, I have to delete the DLL from the bin directory or the debugger will run the old DLL file. (actually, happens on release versions
too). I asked about this earlier, too. Thoughts?

Nov 18 '05 #4

Hi, Steven. Thanks for responding.

1. Winform apps seem to work fine. Also, if I change the ASPX file, it replaces the DLL, it only fails if I edit CS files only.

2. That will take me a while. I'll give it a try and let everyone know.

3. I did just recently turn off the Index Server because of the References problem that it causes - maybe that will improve the situation.

S
----- Steven Cheng[MSFT] wrote: -----

Hi,
Thanks for posting in the community!
From your description, you found that the assembly of a certain web
application can't be replaced with new one when build the web application
in VS.NET. And you need to manually remove the dll file in the bin
directory folder,yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my experience, I agree with Alvin that this problem is likely to
be a permission issue, would you please have a try and confirm the
following items:
1. Have you tried creating a simple winform application to see whether the
problem exists so that we can confirm whether the problem is concerned to
IIS or not?

2. Try creating a new web application, first make it with a simple page and
build it to see whether the problem remains? If not, then try add some
similiar code or reference to what in the former application which suffer
this problem, then build it to see whether the problem remains.

3. Is there anyother things may refer the dll when building the applicaion
so that it can't be overwrited? Or there anything particular in the web
application's code or some certain external components it has refered?

Please check out the preceding items. If you have any questions or if you
got any new findings, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 18 '05 #5
Hi,
Thanks for your prompt response. Now we could focus this problem on web
application issue. As you mentioned that the problem only occur when you
edit the codebehind file rather than aspx. I think this is normal since the
assembly file in "bin" directory only contains the codebehind page classes
and the global class, and the runtime page class (generated from the aspx
and code behind is compiled at runtime) so modification on aspx file won't
cause the assembly in "bin" folder to change. In addtion, as you mentioned
the Index Server, you're using index service, aren't you? Do you think this
may be also a potential clue? I still feel that the issue is likely caused
by other programs or process which is also using or refering the assemly
when build the project. Anyway, if you got any progress on this, please
feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #6
Hi,
Regarding on this issue, have you got any progress or have you resolved the
problem? If you need any assistance, please feel free to let me know.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #7

The problem only occurs when I edit the CS file. When I edit the HTML file (the ASPX file) the DLL compiles OK

Smaller projects do not have this problem. I have several other projects that compile just fine.

I removed the refernces one by one and tried to compile and no one of them seems to be causing the problem. Of course, if I were to remove ALL the references, most otf the project would have to be excluded in order to compile at all. Not much of a test there

I have turned off Index Server on the development server, and while that did solve a permissions problem I was having, it did not solve this problem

If it is a permissions problem is there some logging I can turn on in order to get an error message

----- Steven Cheng[MSFT] wrote: ----

Hi
Thanks for your prompt response. Now we could focus this problem on web
application issue. As you mentioned that the problem only occur when you
edit the codebehind file rather than aspx. I think this is normal since the
assembly file in "bin" directory only contains the codebehind page classes
and the global class, and the runtime page class (generated from the aspx
and code behind is compiled at runtime) so modification on aspx file won't
cause the assembly in "bin" folder to change. In addtion, as you mentioned
the Index Server, you're using index service, aren't you? Do you think this
may be also a potential clue? I still feel that the issue is likely caused
by other programs or process which is also using or refering the assemly
when build the project. Anyway, if you got any progress on this, please
feel free to post here

Regards

Steven Chen
Microsoft Online Suppor

Get Secure! www.microsoft.com/securit
(This posting is provided "AS IS", with no warranties, and confers no
rights.


Nov 18 '05 #8
Hi,
Thanks for your followup. Since you mentioned that the dll can't been
replace problem still remains, is there any detailed error info on it
except genral file curruption error? Also, does the project's dll or itself
been referenced by other project? I doubt whether it is caused by the
project's dll is referenced by other projects as "copy local" as false so
..?
In addition, I think you may try using the "FileMon" to have a monitor when
the project is rebuilded to see whether the project's dll is referenced by
some other projects or some application else?
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #9

No error message is given at all. In fact, I don't even get a file corruption messsge. It is if ASP.NET doesn't even know that the DLL is the wrong version. It goes so fas as to show up when debugging. I can tell when the DLL hasn't compiled because if I set a breakpoint on a changed line of code, the red highlighting may be too long or too short t match the length of the code that used to be there. I can send a screenshot of this if you wish

The project DLL is not being cross-refernced, though this is a good thought. I'll check FileMon today to see if the DLL is being used by anyone - that's a good idea. Is there any advanced build logging I can turn on that I don't know about

----- Steven Cheng[MSFT] wrote: ----

Hi
Thanks for your followup. Since you mentioned that the dll can't been
replace problem still remains, is there any detailed error info on it
except genral file curruption error? Also, does the project's dll or itself
been referenced by other project? I doubt whether it is caused by the
project's dll is referenced by other projects as "copy local" as false so
..
In addition, I think you may try using the "FileMon" to have a monitor when
the project is rebuilded to see whether the project's dll is referenced by
some other projects or some application else
Regards

Steven Chen
Microsoft Online Suppor

Get Secure! www.microsoft.com/securit
(This posting is provided "AS IS", with no warranties, and confers no
rights.
Nov 18 '05 #10
Hi,
In addition to filemon, I think you may have a try on the
"System.IO.FileSystemWater" class which can be used to monitor a certain
file in the system. You can launch a certain instance of this class in a
console or windorm application and monitor the dll file you want. That may
be more clear than the Filemon. For detailed info on the FileSystemWater
class you my view the following reference in MSDN:

#Reacting to File System Events
http://msdn.microsoft.com/library/en...ngtofilesystem
events.asp?frame=true

#Creating Handlers for File System Events
http://msdn.microsoft.com/library/en...nghandlersforf
ilesystemevents.asp?frame=true

Hope this helps.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #11
Fantastic, I;ll give that a try here shortly. Thanks.

S

v-******@online.microsoft.com (Steven Cheng[MSFT]) wrote in
news:gk**************@cpmsftngxa07.phx.gbl:
Hi,
In addition to filemon, I think you may have a try on the
"System.IO.FileSystemWater" class which can be used to monitor a
certain file in the system. You can launch a certain instance of this
class in a console or windorm application and monitor the dll file you
want. That may be more clear than the Filemon. For detailed info on
the FileSystemWater class you my view the following reference in MSDN:

[...]
Nov 18 '05 #12

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

Similar topics

1
by: A. B., Khalid | last post by:
Hello all. After a search on Google it would seem that the users of Mingw have not had good results in compiling the python sources natively. See at least: ...
4
by: Joseph | last post by:
Hi, I've got a page which updates a record, but it fails if the text used contains an apostrophe. I understand I need to replace apostrophes with double quotes in order for it to work? I also...
5
by: Gernot Frisch | last post by:
class Q { public: template<class T>void foo(){} }; main() { Q q; q.foo<int>(); // error
0
by: stefvienna | last post by:
Hi group, I'm trying compiling Python-2.4.1 and it fails builing the _socket extension with the following message: building '_socket' extension gcc -pthread -DNDEBUG -g -O3 -Wall...
1
by: CB | last post by:
Using C# in .Net 2003, DataSet.ReadXml fails when a percentage (%) sign is in the filename followed by 2 hex characters. Seems that the % sign is likely encoding the following 2 hex characters. ...
21
by: Phil Powell | last post by:
<script type=\"text/javascript\"> <!-- var browserArray = new Array(\"Microsoft Internet Explorer\", \"Netscape\"); if (browserArray.in_array(navigator.appName, browserArray) &&...
8
by: rays | last post by:
Hi, I am trying to port a C++ program which is supposed to be standards compliant. It works fine on Linux with GCC (4.x). But as I try to compile it on Windows, all hell breaks loose. I have been...
10
by: Tomás Ó hÉilidhe | last post by:
I'd post this on a gcc newsgroup but I'd be more productive talking to the wall. Anyway, let's say someone throws some source code at you for a particular program and says, "Just compile it, it...
9
by: bowlderyu | last post by:
Hello, all. I meet a question about compiling files. Eg., I have three files named myfile.h, myfile.c and the main.c file, and there is a function, ex, void myfun(...). If I put myfun(...) in...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.