Deploying Silverlight/Prism Solution to IIS

Topics: Prism v4 - Silverlight 4
Feb 28, 2012 at 7:38 PM

Hello all,

I am having a heck of a time deploying my Silverlight 5 solution (with Prism 4.1) into IIS.  Let me give a quick synopsis:

We have a machine, on our network that is used to host all of our test sites/databases/etc.  Our previous application was an application that hooked into a windows service.  Before, I would publish the solution to a folder and then copy/paste the contents to a set folder on the Test Server.  I am doing this same process for the new Silverlight version and all seems to go well, until I try to login.

I type in the required credentials to login and the loading bar turns on and then just stops and the app does nothing.  It doesn't switch to the Employee module page like it should and how it does when running in Visual Studio.  I feel like I am missing some step in the deploy process, but I have gone over Chapter 11 and it seems fine...

Really looking for a bit of help or hope here, thanks.

Feb 29, 2012 at 6:09 PM

IIS is a fun head ache. First off what are you using for your authentication and what are you using to talk to the server (wcf, ria, other)? Does it work on the deployed server if you remove the need to login, if not then maybe there's an issue with getting the Employee module.

If you don't have the program Fiddler2 get it now, this'll show you whats actually happening. Alot of the time IIS will send a very generic error that won't get to the screen but fiddler will capture.

Alot of my issues I had with IIS involved RIA, if your using RIA then maybe this'll help

  • I didn't install RIA on the server and some of my libraries on the web side didn't CopyLocal (even though they're set to true) onto the server.
  • After those I discovered my services were failing and after many hours I discovered that my web.config connection strings had been converted from the connection string to $Tokens to be used with an installer.
Mar 1, 2012 at 9:44 PM

Alright, so I downloaded Fiddler2 and started going with that.  I believe we're using WCF for the service side.  In any event, the problem seems to be that it isn't able to communicate with the service itself.  I got an error back: "An error occurred while trying o mae a request to URI http://localhost:39010/AccessSVR.svc'. .... In any event, I believe that it is set to my local dev environment for the service location.  When I would deploy my site I would have an address in the client web.config file that I could adjust to point to the service location.  What is the best way to do this in a silverlight/prism app.  When i am developing in visual studio, i want it to stay pointed to local host, when it's deployed, i want it to be point to the server address

Mar 2, 2012 at 4:36 PM

Change the webconfig on the server side todo that. Honestly for my companies work we find having a server that we all share the DB to makes things easier.
You can either go into the actual webconfig or go to IIS, your deployed site, connection strings.
Another option is to setup the connection string to be different between Debug and Release mode and have local host as your debug config and always deploy the Release.

Good luck if another error pops up.