locked
WCF service+Silverlight on IIS 7 RRS feed

  • Question

  • Hi I've checked almost everything i could google, but didn't find the solution for my problem. I've got a silverlight project and a web application project with silverlight-enabled WCF service. Then I added service reference to silverlight project with an endpoint of http://localhost:SomePort/SilverlightService.svc Well, everything is fine on my localhost, the service works fine. But when I change service reference's endpoint to http://mysite.com/SilverlightService.svc and then copy all web application files to /inetpub/wwwroot on IIS 7, the service is not working anymore. Moreover, when I try to open http://mysite.com/SilverlightService.svc hoping to see the standard "Your service is working" page, it isn't actually working, giving me the 404 error. And of course I'm sure that the SilverlightService.svc file is situated in wwwroot. BTW, silverlight app and web app are situated in the same root, so there is no cross-domain issues. Thanks for any possible help :)
    Sunday, November 8, 2009 6:26 PM

Answers

  • Hi orparinov,

    You would probalby be better off creating a new application in IIS 7 and place the application files in a new directory instead of just dropping the files in wwwroot.  

    One thing you could check is make sure that WCF has been correctly installed and registered.

    http://msdn.microsoft.com/en-us/library/aa751792.aspx

    When you open IIS 7 and navigate to the Default Web Site, then under Actions select Explore, do you see your app files and SilverlightService.svc file?

    Sunday, November 8, 2009 9:10 PM
  • Hi oparinov,

    WCF was introduced in the .NET Framework 3.0, so you should be ok there.  Unless you're taking advantage of a new WCF feature in the .NET Framework 3.5, in which case you'll need that installed.  The .NET Framework 3.5 should have installed correctly on Server 2008 as the prerequisites are already included.

    About half way down this page are WCF deployment steps for IIS.  Run through these steps with a simple service (something like the default DoWork method) to make sure the server is set up correctly. 

    http://msdn.microsoft.com/en-us/library/ms734710.aspx

     

    Monday, November 9, 2009 11:22 AM

All replies

  • Hi orparinov,

    You would probalby be better off creating a new application in IIS 7 and place the application files in a new directory instead of just dropping the files in wwwroot.  

    One thing you could check is make sure that WCF has been correctly installed and registered.

    http://msdn.microsoft.com/en-us/library/aa751792.aspx

    When you open IIS 7 and navigate to the Default Web Site, then under Actions select Explore, do you see your app files and SilverlightService.svc file?

    Sunday, November 8, 2009 9:10 PM
  • Hi clint1222, Thanks for your help. I've checked WCF in IIS settings, and it was turned off, so I installed this component, but nothing changed. Then I noticed that the version of installed NET framework is 3.0, so I downloaded from microsoft's site new version and tried to install it, but installation error happened. (without any error information, just "installation error") Anyway, is NET framework 3.5 required for WCF correct work?

    When you open IIS 7 and navigate to the Default Web Site, then under Actions select Explore, do you see your app files and SilverlightService.svc file?

    Yes, I do. By the way, my OS is Windows Server 2008 (maybe this is important)
    Monday, November 9, 2009 5:48 AM
  • Hi oparinov,

    WCF was introduced in the .NET Framework 3.0, so you should be ok there.  Unless you're taking advantage of a new WCF feature in the .NET Framework 3.5, in which case you'll need that installed.  The .NET Framework 3.5 should have installed correctly on Server 2008 as the prerequisites are already included.

    About half way down this page are WCF deployment steps for IIS.  Run through these steps with a simple service (something like the default DoWork method) to make sure the server is set up correctly. 

    http://msdn.microsoft.com/en-us/library/ms734710.aspx

     

    Monday, November 9, 2009 11:22 AM
  • clint1222, thank you very much for youк help. I've tried to delete all files from wwwroot and then copy them again, and then the service worked! :) I do not actually know what was the problem, but now it's gone )
    Monday, November 9, 2009 4:17 PM
  • Excellent.

    Monday, November 9, 2009 6:21 PM