Niraj Bhatt – Architect's Blog

Ruminations on .NET, Architecture & Design

XBAP + Application Download Error

Recently I was trying to access a published XBAP application in LAN. While try to browse to XBAP file it gave me a Application Download Error. After struggling for some time I found a solution that worked. I went to IE -> Tools -> Internet Options -> Connections -> LAN Settings -> Advanced & made an entry in – “Don’t use proxy server for addresses begining with”, 192.168.*. After a Refresh, things came back to normal 🙂 .

N.B. 192.168 – were the starting IP Classes assigned to the LAN I was working on, so they may be different for your environment.

One more error I had encountered was unable to load – .config file. If you are on IIS 7, one solution to it is given here (Search for IIS7 Restrictions and XBAP). There is one more link which is quite useful.

Other typical errors you might encounter are:

1) 403 Forbidden: couldn’t download .config file
2) 500 Internal Server Error: couldn’t download .dll file
3) 404 file not found – .dll / .config not found error
4) Protocol Violation Error, Section=ResponseStatusLine

For above of these, I request you to check the IIS Log files. Try to figure out the error from there. You can browse to the file per se that’s showing error (e.g. right click the config file or dll file & say Browse). Ensure this is working (e.g. config file get’s displayed as XML in browser, .dll file opens in a save dialog box, etc.). Check that Anonymous access is there for the web site / Virtual directory (if your security permits). Get rid of internet proxy if any is involved (as described earlier). If you are calling a WCF / Web Service ensure that both are in same domain or if possible on same server. WCF URL’s in the config file should not use localhost instead they should use LAN / WAN IP Address (simple but sometimes you may miss it 🙂 ). Fiddler is a great debugging tool which can be put in to use here. 

For 4th issue you can add following configuration to app.config of XBAP project

  <httpWebRequest useUnsafeHeaderParsing=”true” />

Well, I know for sure that you can loose your hair over XBAP deployment 😦 . If you have encountered other issues or resolved similar issues please do drop a line.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: