Silverlight 4 - Application + webvervice on IIS 7 RRS feed

  • Question

  • Hello,

    I'm having problems to host my Silverlight 4 - Application under IIS 7, I need your help.

    The project:

    - The project, which will be hosted, as we said a Silverlight 4 - application with an embedded webservice (*. svc)

    - IIS Version 7

    - Server: Windows Server 2008 r2 bit - 64

    Previous approach:

    - The project is in the following directory on the server: C:\inetpub\wwwroot\

    - Afterwards the directory was converted into an application on the IIS Manager.

    - The application pool for the project (classic) was converted to the .NET - Version 4, because otherwise I get problems with the following line in my web-config:

                 <compilation debug="true" targetFramework="4.0">

    - Added the HTML-File as "default document" in the project

    - The connection strings have been adapted to the new database connection.

    - The handler mappings for svc-files are also available (svc-Integrated, svc-ISAPI-2.0, svc-ISAPI-2.0-64).

    Now I could launch the application the first time. However, I could not login. After an "error analysis" I realized that I can not call the  service address.

    The following message I get when I run the service:

            HTTP Error 404.17 - Not Found
            The requested content is obviously a script and can not be displayed by the handler for static files.

    Do I need to embed the service somehow? Is my approach wrong / something has been forgotten?

    How do I host a Silverlight4 application under IIS 7 correctly?

    Thanks in advance.

    Tuesday, July 13, 2010 8:22 AM


  • Hi,

    Before trying to debug you can try out the following things

    1) Did you change the servicereference.clientconfig endpoint address to point to your IIS deployed webservice? If not that is the failure most of the times.

    2) Is your Silverlight app trying to access a webservice from another domain then this would be a reason for failure. You need to place a crossdomain file at the root of your service.

    The best way to debug is use WebDevHelper to check the response you get.

    HTH. Mark as answered if that helps :-)



    Tuesday, July 13, 2010 8:39 AM