Afsan Abdulali Gujarati
Afsan Abdulali Gujarati

Reputation: 1614

Host and Debug Silverlight application through IIS

I've been new to silverlight applications and trying to figure out this issue for past few days. I tried creation a silverlight application in VS 2012, there are two separate projects created,

  1. With Xaml files where the actual content exists
  2. The .Web project where the .xap file is created.

When I tried running this through VS with breakpoints in the first project through IE the breakpoints were connected quite well. When I tried hosting this project on IIS and tried running it on IE, it worked. (I hosted the .Web project only) While I tried browsing the silverlight app from IIS and attached the process to IE with type silverlight,x86 in VS with those breakpoints in project 1, I was unable to hit them. Please help me to debug my silverlight app when I try to browse it from IIS. I tried everything I could think of so far. A hint would really be helpful. Thank you.

Upvotes: 0

Views: 314

Answers (1)

Afsan Abdulali Gujarati
Afsan Abdulali Gujarati

Reputation: 1614

Phew, finally this is fixed. Everything was precisely as it was supposed to be, I just missed out on the flow that was necessary. Below is the approach to debug silverlight app through IIS

  1. Create a new silverlight app in vs
  2. build it and create a new website in iis
  3. in website add the silverlight.web project
  4. add breakpoints in silverlight app from the same path as hosted in iis
  5. browse the aspx page of .web from iis
  6. click on attach to process (while the aspx page in running in IE) and search for iexplorer with type silverlight,x86 and click attach. (Make sure you're running VS in admin mode).
  7. Refresh the IE page, and voila you have what you want.

Upvotes: 1

Related Questions