ClickOnce deployment issue
Stack trace after download but before app starts...
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 2.0.50727.3603
System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000)
mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600)
dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)SOURCES
Deployment url : file://SRV1001/Root/AppFolder/Programs/Tools/Navigator/Alpha/PreAlpha/Navigator.application
Deployment Provider url : http://Laptop101/Navigator/Navigator.applicationERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\SRV1001\Root\AppFolder\Programs\Tools\Navigator\Alpha\PreAlpha\Navigator.application resulted in exception. Following failure messages were detected:
+ Downloading http://Laptop101/Navigator/Navigator.application did not succeed.
+ Unable to connect to the remote server
+ No connection could be made because the target machine actively refused it 96.42.222.179:80COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.WARNINGS
There were no warnings during this operation.OPERATION PROGRESS STATUS
* [11/6/2009 7:44:19 AM] : Activation of \\SRV1001\Root\AppFolder\Programs\Tools\Navigator\Alpha\PreAlpha\Navigator.application has started.ERROR DETAILS
Following errors were detected during this operation.
* [11/6/2009 7:44:24 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://Laptop101/Navigator/Navigator.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Unable to connect to the remote server
- Source: System
- Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.Sockets.SocketException
- No connection could be made because the target machine actively refused it 96.42.222.179:80
- Source: System
- Stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
I did a reverse DNS lookup of 96.42.222.179 from this error "No connection could be made because the target machine actively refused it 96.42.222.179:80" and found it to be a Charter DHCP server address. I don't understand why an install onto a client that already has a ip address (via DHCP) is doing this... Any insight would be great... So I'm wondering what would an install have to do with sending a packet outbound to a DHCP Server... There's nothing like that type of function in my app...
Javaman- Moved byDavid M MortonMVPFriday, November 06, 2009 2:15 PMNot a C# General question (From:Visual C# General)
Answers
- Found the root cause after 5 days...
Under Project Properties/Publish/Updates there was a reference to an HTTP://localhost/xxxxxx I am not sure how I put that value there being that my development computer does not run IIS, however, because it was indeed set to localhost, the click once update support was attempting to look for an Update. What I had thought was a DNS query, was more likely a request to look for updates to the application due to port 80 being involved in the request. But how local host wound up going out as _host-config._udp.local and _network-scan._tcp.local is beyond me. The "apparent" DNS port 80 query did NOT find any updates for the application. However, the update application logic couldn't handle what was returned and stopped all futher installation.
Learned a few other things as well. In the VS Express editions, the app manifest is regenerated by 1) Deleting it and 2) Making sure the Properties/Application menu shows the Manifest field set to Properties\app.manifest. 3) Then a new manifest will be generated only when going to the Properties/Security menu and unchecking "Enable ClickOnce Security Settings". This implies that the app manifest is not needed when "Enable ClickOnce Security Settings is set because it only gets generated when it's unchecked. I did find in the clickonce documentation that the app manifests will be autogenerated in VS deployment when using clickonce. So none of my manifest "hunting" did me any good in this problem.
Javaman- Marked As Answer byMr. Javaman Monday, November 09, 2009 4:06 PM
All Replies
- Bit more info...
If I deploy to my local computer everything installs fine when clicking setup.exe locally.
Changing the manifest configs (embed, no manifest, properites/apps) has no effect (same error as above when installing from intranet)
argh!
Javaman - try 1:remove URL from publish ...then check
try 2:Regenerate manifest
Regards
Sai Satish
Indian Servers
Sai Satish Indian Servers http://www.indianservers.com - Removed URL but am using VS Express (C#) no regenerate manifest in IDE option.
So I went to the Options page and Under the Manifests clicked all items and published (expecting it to fail, which it did with a different error)
Then I reset the manifest options to just include Icon on desktop.
Still failing with same error as shown above....
Javaman - Ran a communications trace, here's what's happening....
For some reason there is an outbound DNS request with two queries:
1) _host-config._udp.local: type SRV, class IN, "QM" question (A DNS outbound query attempt for the _host-config._udp.local name)
2) _network-scan._tcp.local: type SRV, class IN, "QM" question
A QM query is a multicast query. No TCP Application can run without a Host name resolve.
So from this there appears to be some TCP part, needing a resolve. Because it's at install time, it must have something to do with parameters in the application.manifest as you suggested.
Now the timeout on the DNS request happened before the response eventually came into the client installing the application and here's what that payload looked like.
It had something to do with : "Internet Security Association and Key Management Protocol"
So I'm wondering if I've hosed up something with respect to work I was doing a week ago to attempt to sign the app with a test certificate that I wanted to import into the certificate store to stop those annoying "non trusted certificate install messages"...
Javaman - More info, deleted all certicates in cert store (the one's I generated as Test Certificates) retried the deploy with brand new certificate.
Same Problem...
Javaman - Determined this is NOT a certificate issue so......
After running the wireshark trace above which showed me an outbound DNS request to port 80, decided to run WinDBG... here's what I saw:
ClickOnce requires a bunch of module loads such as .net runtime support as well as MSI...
MSI gets loaded and then I see the .NET error while WINDBG shows MSI as last non-managed code that's running. Using SOS, I found that indeed the failure is happening in the click once support as the stack trace showed. So MSI has loaded and begun to run the .NET deployment support.
One of the first things that happens in clickonce (if you've checked the "check for updates option") is that it goes to the URL indicated on the Project Properties/Publish/Updates menu.
I think I'm on to the root cause because I just so happened to look into a referenced project and saw that the url was http:/localhost/xxxxxxxx. In the com trace above I see a DNS request going out to localhost port 80.... which is strange because DNS requests should go out on port 53 using UDP.
Will investigate further and post back. What I think is happening is that this computer doesn't have IIS installed, so clickonce sees and application update of http://localhost/xxxxxx which implicitly means port 80, but because there's no localhost resolve, a DNS request goes out to the configured DNS server to resolve "localhost", the DNS server returns no resolve because it attempts to hit port 80 in TCP rather than port 53 in UDP. However, this DNS server does have a web page listing all the addresses it knows about, that's what's returned, which does not conform to the protocol for autoupdate ability in the clickonce support.
TX!
Javaman- Edited byMr. Javaman Monday, November 09, 2009 4:09 PM
- Found the root cause after 5 days...
Under Project Properties/Publish/Updates there was a reference to an HTTP://localhost/xxxxxx I am not sure how I put that value there being that my development computer does not run IIS, however, because it was indeed set to localhost, the click once update support was attempting to look for an Update. What I had thought was a DNS query, was more likely a request to look for updates to the application due to port 80 being involved in the request. But how local host wound up going out as _host-config._udp.local and _network-scan._tcp.local is beyond me. The "apparent" DNS port 80 query did NOT find any updates for the application. However, the update application logic couldn't handle what was returned and stopped all futher installation.
Learned a few other things as well. In the VS Express editions, the app manifest is regenerated by 1) Deleting it and 2) Making sure the Properties/Application menu shows the Manifest field set to Properties\app.manifest. 3) Then a new manifest will be generated only when going to the Properties/Security menu and unchecking "Enable ClickOnce Security Settings". This implies that the app manifest is not needed when "Enable ClickOnce Security Settings is set because it only gets generated when it's unchecked. I did find in the clickonce documentation that the app manifests will be autogenerated in VS deployment when using clickonce. So none of my manifest "hunting" did me any good in this problem.
Javaman- Marked As Answer byMr. Javaman Monday, November 09, 2009 4:06 PM


