Cross Domain Error Fix for Silverlight

Date March 18, 2008

The easiest/quickest way to fix a cross domain error is to create a test website to host your Silverlight application.

image

When you hit F5 to debug the application, it will run the development server and the address bar will say http://localhost:xxx/blahblah.  This will prevent a cross-domain error.

If you try to run it using an test html page from the file system i.e. browser address would say something like c:\projects\silverlighttest.html then it will throw the cross-domain error.

If you already have your Silverlight application created then just create an empty website or web application project and then right-click on it and click "Add Silverlight Link…"

image

Then follow the instructions on the screen

image

kick it on DotNetKicks.com

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Close
E-mail It