By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,625 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,625 IT Pros & Developers. It's quick & easy.

Question on building projects using VS .NET

P: n/a
Hello All,

I have a question as to why my users are noticing error when I am building
the project on the production system. Here is the problem's background.

In order to build the project on the production system, I use the Visual
Studio's File > Open From Web and then build the solution. Some of the build
settings are as follows:

Output path: bin
Project folder: c:\intepub\wwwroot\

IIS's home directory is also pointing to the same location i.e.,
c:\inetpub\wwwroot\
My problem is whenever I build the project on the server and if any of the
users are using the application they encounter an error since the project is
being built. Does any one know how I can prevent these errors?

I tried changing the output path to bin\dynamic leaving the project folder
as it is. I assumed that whenever I build the project the dll would be
created in bin\dynamic directory and the users would be using the dll in bin
directory and then I could copy the new dll from bin\dynamic to bin\ which
would prevent users from encountering the error. However, even after changing
the settings, users are noticing that error. Why is this happening? Does not
the App Domain use old dll which is in bin\ directory for the requests?

I tried to print the clrstack whenever I am building the project. Here is
the call stack in response to the error that is being noticed by the end users

0:000> !clrstack
Loaded Son of Strike data table version 5 from
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msco rwks.dll"
Thread 0
ESP EIP
0x0730f6e8 0x7c90eb94 [FRAME: ECallMethodFrame] [DEFAULT] Void
System.Environment.ExitNative(I4)
0x0730f6f8 0x79a15596 [DEFAULT] Void System.Environment.Exit(I4)
0x0730f6fc 0x06c60f3b [DEFAULT] [hasThis] Void
SoftArtisans.Net.FileUpModule.AppDomainUnload(Obje ct,Class System.EventArgs)
0x0730f728 0x00bbb833 [FRAME: MulticastFrame] [DEFAULT] [hasThis] Void
System.EventHandler.Invoke(Object,Class System.EventArgs)
0x0730f73c 0x799f00ad [DEFAULT] [hasThis] Void
System.AppDomain.OnUnloadEvent()
0x0730f998 0x791d94bc [FRAME: ContextTransitionFrame]
0x0730fb58 0x791d94bc [FRAME: ECallMethodFrame] [DEFAULT] Void
System.AppDomain.nUnload(I4,Class System.Threading.Thread)
0x0730fb68 0x799f0005 [DEFAULT] [hasThis] Void
System.UnloadWorker.UnloadWithLock(Class System.AppDomain,Class
System.Threading.Thread)
0x0730fb94 0x799eff9e [DEFAULT] [hasThis] Void
System.UnloadThreadWorker.ThreadStart()
0x0730fdc0 0x791d94bc [FRAME: GCFrame]

Though I am not an expert in analyzing this stack, I can figure out that
application domain is being unloaded.
I assumed that .net framework does the shadow copy of the assembly into a
secure location and lock it. And whenever the assembly is changed it would
unload the application domain and drain stop that app domain. At the same
time it would create a new app domain and copy the new assembly and start
using that assembly to serve user's requests.

Why are the users noticing the error if the above assumptions are true? How
much is the time delay between switching from a old app domain to newly
created app domain? Would that delay result in errors?

Are the two events [ i) project being built ii) users accessing the
application ] related in any way?

Thanks!!
Mar 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You are letting users access your website while you are developing it??
You might consider a staging process, where you copy the project
(Project/Copy Project) to a separate server for your users to use.

Mar 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.