Cross Domain Error Fix for Silverlight

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:projectssilverlighttest.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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s