Question: I have developed a Silverlight Business Application using Prism that requires a user to log in before they can access the main application. The Silverlight application is hosted on IIS 7.5 (port \*:8086) and makes calls to WCF services hosted on the same instance of IIS 7.5 (port \*:8069)

When I access the Silverlight application via `http://localhost:8086` all works as expected (i.e. after successful authentication, prism modules are loaded and views switched appropriately) but when I access it via either the machine's name (`http://xps1521-pc:8086`) or IP address (`http://192.168.10.104:8086`), it does not work as expected (i.e. after successful authentication, prism modules are loaded **BUT** views are not switched). I cannot seem to figure out why this is happening and would appreciate some help/guidance.

Thanks!

Answer: 
After close inspection of the exception you submitted, I think this is the problem.

most probably you're using some sort of reflection code (or opening a UI Dialog) in your ViewModel subscription handler that can only be executed when Silverlight runs in Full Trust Mode.

So when the URL of the silverilght application changes from something besides localhost (your dev server) , it doesn't run in Full Trust Mode anymore, that's why you get that exception.

You have to check if you're are executing any method call with the attribute [SecurityCritical]. If so and if you really need to execute that method than you have to run the Silverlight client in Full Trust mode (not recommended since this should only be feasible for intranet scenarios).

See this for more [info](http://msdn.microsoft.com/en-us/library/ee721083%28v=vs.95%29.aspx)

Hope it helps
I have traced my woes to a `MethodAccessException` as described [here](https://stackoverflow.com/questions/1637720/event-subscription-with-prism-giving-methodaccess-exception)