Wednesday, April 11, 2012

Why does my WPF .NET4 app starts slow on PCs first time when I can only ping the internet

I have deployed a WPF .NET4 application on my customer's network.
The network can ping the internet, but the PCs are not able to browse.



It takes about 60 seconds to start the application.
TcpView shows that the app is trying to communicate with these URLs:



customer.teliacarrier.com
office365.com
msgr.dlservice.microsoft.com
akamaitechnologies



If we open the internet and starts the application once everything work fine and we can close the firewall again.



Does anyone know why the app communicates on the URLs the first time???





3 comments:

  1. If you used ClickOnce deployment or 3rd party components the app might be looking for updates.

    All of the URLs (except for the office365.com) refer to download/mirror sites.

    You could try to have a look at the requests that are being send to get more details.

    ReplyDelete
  2. If you have signed your files they may be trying to authenticate against a Certificate Authority. Also - make sure you ngen your wpf files before delivery - this speeds up the first launch of the file (Regardless of reaching out to websites). http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.80).aspx

    ReplyDelete
  3. The customer has solved the problem. The firewall was configures to allow ping to all external sites. When they changed the rule to not allow ping everything worked fine. I think that .NET 4 uses some signed files that the machine tries to authenticate.

    ReplyDelete