WCF error- The XML page cannot be displayed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saumitra Kumar Paul
    New Member
    • Aug 2010
    • 12

    WCF error- The XML page cannot be displayed

    Hello friends,

    I am new to WCF. Now working with a learning example. My environment is VS2008, .Net framework 3.5, Hosted in Windows sever 2003 R2.

    The following code i have in a Service.svc file-
    Code:
    <% @ServiceHost Language=C# Debug="true" Service="MyWCFService" CodeBehind="~/App_Code/Service.cs" %>

    But when i test it in browser, browser returns an error with the following lines-

    The XML page cannot be displayed

    A name was started with an invalid character. Error processing resource "http://localhost/WCFServiceDemo/Service.svc". Error on line 1 at column 2:

    I could not find the error.

    Any help is appreciable.

    SKPaul
  • Paul Johnson
    New Member
    • Oct 2010
    • 97

    #2
    Where is this example from? I'd check that you have spaces in the right place, it's one of the most common mistakes.

    Comment

    Working...