Mark Levison

Musings on No Touch Deployment, .NET development and photography

<July 2008>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789


Navigation

Other

Blogroll

Subscriptions

Post Categories



Debugging No Touch Deployment apps

So you've built a WinForms app and its a struggle to deploy, here are some tips.

Clear the IE and download cache (gacutil /cdl) on the client machine to ensure that old versions of dll's have not been left lying around. 

Check the client machine trust's your application/website.

Ensure the vitrual directory (in IIS) that has your .exe and .dll's is properly configured

  1. Ensure the permissions are set to Read and Run Scripts. (Not Execute as that would try to run applications server side).
  2. If the application uses a configuration file then ISS's default handling must be disabled: Under Configuration dialog in the Mappings Tab, remove the entry for the .config extension.
  3. Don't use a virtual directory named “exe“ - apparently asp.net has a directory watcher process that 'corrects' the permissions of exe directories once a day.

Use your IIS log to see if the application files have been sent to the client.

Enable the "IEHost Log" (more details including how read the log at: >>http://support.microsoft.com/default.aspx?scid=kb;en-us;313892)
Add the following registry keys (using Regedit):
In HKEY_LOCAL_MACHINE/Software/Microsoft/.NETFramework

  • Add a DWORD value named DebugIEHost to this key; assign it any non-zero value.
  • Add a string value named IEHostLogFile. Assign it the full path (including the file name) of the file in which you want to record the debug trace (for example, C:/Temp/IEDebug.log).

Use fuslogvw (installed with dev environment) to look for binding errors.  At the end of the help page there are a couple configuration settings that are occasionally useful in debuginng bind problems.

Now the application is running on the client machine here are the tools I use to debug it:

  • To launch a debugger, put the call 'System.Diagnostics.Debugger.Break();' in your code. That will launch the JIT debugging dialog. I recommend you choose 'New Instance of Mircosoft CLR Debugger 2003' (don't choose your current editing devenv, it will probably lock up).
  • Attach to the running process via the Processes dialog (Debug -> Processes...)
  • To capture Debug.WriteLine() output, use Sysinternals DebgugView This is the only option that doesn't require the development enviroment on the client machine.

If you want to see a no touch deployment application in action, see my posting: First Commercial .NET No Touch Deployment application

posted on Saturday, August 28, 2004 2:41 PM by mlevison





Powered by Dot Net Junkies, by Telligent Systems