简体   繁体   中英

Debugging Silverlight applications with IE9 beta

I spent some time debugging a SL3 application with VS 2010 in IE9 beta today and noticed a few quirks. 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

我在Silverlight 4中也注意到了这一点,但是当我开始一个简单的Web项目时也是如此。

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM