WCF Service Parser Error

Discussion in 'ASP.NET / ASP.NET Core' started by mthornal, Sep 3, 2008.

  1. Problem solved. Although the files had been FTPed, the WCFService directory hadn't automatically been made a web application. This was easily resolved using the Web Application Tool in the DASP Control Panel.
     
  2. I've created a new WCFService based on the WCF Service Web Site template in VS2008 using the FTP connection option to connect directly to my site (IIS7/Windows2008). I then replaced the files created by the template with those in this post http://community.discountasp.net/default.aspx?f=24&m=16709&g=22958#m22958and made the appropriateURI update in the MyServiceHostFactory class. Unfortunately whenever I browse to the service page I get a Parser Error:

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The CLR Type 'MyServiceHostFactory' could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application's \App_Code directory, contained in a compiled assembly located in the application's \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application's root directory and cannot be nested in subdirectories.

    Source Error:





    Code:
    Line 1:  <% @ServiceHost Language="C#" Debug="true" Service="MyService" Factory="MyServiceHostFactory" CodeBehind="~/App_Code/Service.cs" %>
    

    I have double checked all the files and cannot understand this. Any ideas what I'm doing wrong?


    Thanks


    Martin
     

Share This Page