开发者

Debugging Silverlight applications with IE9 beta

开发者 https://www.devze.com 2023-01-16 03:37 出处:网络
I spent some time debugging a SL3 application with VS 2010 in IE9 beta today and noticed a few quirks.开发者_JAVA百科Sometimes when launching the Silverlight app in VS it fails to load in the browser,

I spent some time debugging a SL3 application with VS 2010 in IE9 beta today and noticed a few quirks. 开发者_JAVA百科Sometimes when launching the Silverlight app in VS it fails to load in the browser, but refreshing with F5 tends to fix the problem. Also, there are sporadic scripting errors that pop up a debug dialog - these also seem to be fixed by refreshing the page. Has anyone run into these problems and found a fix?

EDIT: My most prevalent error is: Error: ASP.NET Ajax client-side framework failed to load.


I don't understand why, but someone without a name at the Silverlight forums has found a solution that worked for me:

Just add or uncomment this entry to your hosts file (%SystemRoot%\system32\drivers\etc\hosts): 127.0.0.1 localhost


I noticed this as well with Silverlight 4, but also when I start a simple web project.


IE9 has a shorter startup time that IE8. Debugging a Silverlight application starts the development web server to host the http:// site. The time that it took to start up the web server was less than the time to start up IE8 and greater than the time it takes to start up IE9.


@Michael S. Scherotter - It can't be because of the shorter startup time because making the host file change which fixed it for me would have zero impact on app startup time. Something else must be causing the browser and Cassini to not talk to each other correctly.


One other fix, related to the others is to change the StartURL to launch to the loop back address directly, rather than editing the hosts file. So, in one app, I've got this as the start URL:

http://127.0.0.1.:60525/

Of course, to make this work consistently, I've selected a "specific port" in configuration, as 60525 in this case.

(the trailing . after the loop back address is to allow Fiddler to do its magic).

0

精彩评论

暂无评论...
验证码 换一张
取 消