문제

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top