Christopher Payne

I have a legacy .Net 1.1 application that is no touch deployed. It has been working for over a year, and I've updated it many times in the past.

I'm trying to deploy an update to the application today, but it isn't working. When I click on the link to launch the application, I get the generic "Application has generated an exception that could not be handled" dialog. When I click Cancel to debug the application, it allows me to select the debugger, and I choose the instance of Visual Studio that has the solution open. After I select the processes to attach to, however, I get this message:

"Unable to attach to the process. The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."

The application works fine when I run it in Visual Studio, and it also works fine if I run the executable from the deployment folder in IIS (just clicking on the .exe directly instead of clicking on an http link to the app). Also, the first thing the application does is attaches a handler to the Application.ThreadException event, but the error is reported as being untrapped anyway. I also simplified the ThreadException handler to only show a message box with the exception message to make sure it wasn't an error in the ThreadException event.

Any ideas



Re: ClickOnce and Setup & Deployment Projects No Touch Deployed Application Debugging

Daniel Vaughan

Hi Christopher,
have you put a stack trace in the message box That might give you more of a clue about what the problem is. Also, you may want to log the exception to the even log.

Daniel





Re: ClickOnce and Setup & Deployment Projects No Touch Deployed Application Debugging

Christopher Payne

Good idea to log the exception to the event log.

There seem to be multiple problems going on. One of them was that it was choking on my message logging component, which logs messages to the database. I've temporarily (and grudgingly!) removed that component (never mind the dozen other apps that use it successfully), but that has only partially helped.

I have 3 deployments of my application on the same NTD server: Development, Stage and Production. All 3 of these are under the same virtual directory. Having replaced my logging component with simply writing to the EventLog, I now have the Development deployment working.

But when I update the Stage deployment, the application does not launch. I click the link, IE shows the progress bar for about 1/4 second, the mouse pointer flickers to the hourglass and back. But the app never opens. The first thing the app does is write to the event log, and that entry does not appear. No error message, just nothing.

So I created a brand new folder at the same level as Development and Stage, and called it Test. I copied all the files from the Development folder, create a new link to the Test deployment, and it works fine. Then I deleted all the files from Stage and copied the same files from Development. Again the link fails to launch the application.

Maybe the old version is still cached I think...so I delete the files from Stage again, and click on the link. As expected, HTTP 404 error. Copy the files back to Stage, and again the link simply doesn't launch the application.

Time to take a break and vacuum this hair up off the floor...





Re: ClickOnce and Setup & Deployment Projects No Touch Deployed Application Debugging

Daniel Vaughan

You mentioned that you have a handler to the Application.ThreadException event. This event won't occur until your main form is initialized, and it will be occur for exceptions on the main gui thread. You might want to try wrapping the early code in a try catch to find out what's going wrong.

Daniel






Re: ClickOnce and Setup & Deployment Projects No Touch Deployed Application Debugging

Christopher Payne

Thanks for the info on the thread exception handler. I was wondering why sometimes it could catch an exception and sometimes it couldn't.

I actually do have a try/catch around the code in main(). But the current problem is the application doesn't execute at all from my stage folder, so it never gets to the first line. It is very strange that I can deploy to any folder I want inside the virtual directory and it works...unless I use the "Stage" folder. I'm afraid of the same thing happening when I deploy to my "Production" folder. If I have to change my production folder that is going to be a much bigger hassle than having to change my stage folder.