Silverlight XAP File not being downloaded
Wow. The feature that shows related questions WHILE making the questions is very nice. Unfortunately, none of the questions addressed my problem, nor did any of my searches worked. I did find several questions with the same problem I'm having, but none of the solutions have worked for me.
My development laptop is WinXP with IIS 5.1. I'm developing a Silverlight 4 application. Everything was working 100% perfectly, even without registering MIME Types in IIS. Last Thursday, VS.NET stopped debugging my application and the area where Silverlight was supposed to show was being left blank and there were no java errors shown by Internet Explorer 8. I got the same behavior in Firefox 4. If I right-clicked on the blank area, the usual Silverlight context menu showed up and I could see the settings.
Using Fiddler I noticed that the browser makes the request to the correct file, but it looked like the server either hangs or did not respond with the file stream. With this information I browsed my virtual directory using the browser and tried downloading the file with a right-click/save-as, but the browser just hanged waiting for a response from the server.
Tweaking the source code I noticed that, if I comment some code (any code at random, no code specifically, as long as no compile time error shows up), the application starts showing the log-in page correctly and I can download the XAP file correctly again. If I un-comment the code, the log-in stops working again and I cannot download the XAP file anymore.
I already tried registering MIME types in IIS (and double and triple checking I was writing the entries correctly), double and triple checking that the XAP file address was correct, tried changing the XAP extension to ZIP, and reinstalling Silverlight 4 Tools for VS.NET 2010.
At some time I thought it might be something about the XAP file size, which sits at 512K working or not. So I placed a 30MB file in the same directory as the XAP file. However, when I try to download the 30MB file, the download starts successfully.
For example, using directory browsing, the file shows 523587 bytes in length. This can be downloaded normally. If I un-comment whatever code I commented, the file shows 524194 bytes and the download stop开发者_运维知识库s working.
One last thing, I checked the Even Viewer and noticed an error thrown by ASP.NET. "aspnet_wp.exe (PID: 2100) stopped unexpectedly." Googled about this error and most hits took me to a virus and several tools for its removal. Tried the tools as well and all of them reported not finding any indication of the virus.
精彩评论