none
Hosting WCF Service RRS feed

  • Question

  • Hi All,

    I have created a service in WCF 4.0 and prepared MSI to install. After installing, I tried to browse svc file, It is throwing exception. The reason I identified is, MSI is creating WCF service under IIS Default Web Sites. If I create separate web site for WCF service under Sites then it is working fine. I unable to identify the reason why it is throwing exception if it is under IIS Default Web Sites.

    The exception is given below. Please suggest how to resolve this issue.


    Thursday, May 16, 2013 7:26 AM

Answers

  • Have you compared application pool settings between the ISS Default Web Site and the seperate web site you created yourself?

    Maybe the runtimes selected for those application pools are different?

    Grts


    -

    Thursday, May 16, 2013 10:14 AM
  • Hi Venkat,

    If the target server is in the same local intranet and accessible from your dev machine, I'd suggest you try using Visual Studio to directly publishing the web site (host the WCF service) to the IIS default site to see if it works.

    #How to: Deploy a Web Project Using One-Click Publish in Visual Studio
    http://msdn.microsoft.com/en-us/library/dd465337.aspx

    #WCF Service Publishing
    http://msdn.microsoft.com/en-us/library/bb924407.aspx

    Normally, there are several things we can check when IIS failed to server WCF service requests:

    * IIS web site's extention mapping for .svc file extension. Make sure .svc extension is mapped to the .NET's WCF service activation handler. You can also compare the default site's setting to the working site's setting

    * IIS web application's app pool settings, such as .NET framework version, app pool account

    For IIS app pool failed to start, you can also check the windows eventlog to see if there is any useful entries. And if the problem is related to file/directory access permissions, you can also try using process monitor tool to check the file access errors from IIS related process.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 23, 2013 3:04 AM
    Moderator

All replies

  • Have you compared application pool settings between the ISS Default Web Site and the seperate web site you created yourself?

    Maybe the runtimes selected for those application pools are different?

    Grts


    -

    Thursday, May 16, 2013 10:14 AM
  • Thanks for reply Steven.

    Both application pool settings are same. Even I used the same application pool which is working But still same issue.

    Regards,

    Venkat.


    Thursday, May 16, 2013 11:21 AM
  • There are possible causes and options listed below the error try those. Have you tried to create virtual directory manually under default web site
    Thursday, May 16, 2013 4:54 PM
  • Hi,

    As VikasBhardwaj said, please check the possible causes and things you can try in that exception page.

    To get the actual issue, please turn on tracing for your service to get more details, also you can utilize SvcTraceViewer.exe tool to analyze the diagnostic traces.

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

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 17, 2013 3:13 AM
    Moderator
  • Hi Venkat,

    If the target server is in the same local intranet and accessible from your dev machine, I'd suggest you try using Visual Studio to directly publishing the web site (host the WCF service) to the IIS default site to see if it works.

    #How to: Deploy a Web Project Using One-Click Publish in Visual Studio
    http://msdn.microsoft.com/en-us/library/dd465337.aspx

    #WCF Service Publishing
    http://msdn.microsoft.com/en-us/library/bb924407.aspx

    Normally, there are several things we can check when IIS failed to server WCF service requests:

    * IIS web site's extention mapping for .svc file extension. Make sure .svc extension is mapped to the .NET's WCF service activation handler. You can also compare the default site's setting to the working site's setting

    * IIS web application's app pool settings, such as .NET framework version, app pool account

    For IIS app pool failed to start, you can also check the windows eventlog to see if there is any useful entries. And if the problem is related to file/directory access permissions, you can also try using process monitor tool to check the file access errors from IIS related process.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 23, 2013 3:04 AM
    Moderator