0
votes

I tried to publish an asmx web service to GoDaddy, and then consume it from a console application.

So I managed to publish it to my GoDaddy domain via FTP. When adding a Service Reference to the .asmx file, I get the following error.

How can this be solved?

The document at the url http://www.myDomain.com/myFolder/Service1.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'XML Schema' is 'Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2.'. - Report from 'DISCO Document' is 'Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2.'. - Report from 'WSDL Document' is 'There is an error in XML document (1, 2).'. - Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2. Metadata contains a reference that cannot be resolved: 'http://www.myDomain.com/myFolder/Service1.asmx'. The content type text/plain of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 93 bytes of the response were: '<%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="MyFirstAsmx.Service1" %>'. If the service is defined in the current solution, try building the solution and adding the service reference again.

1

1 Answers

3
votes

You need to ensure your service is in an ASP.NET enabled "site" first.

The error says the web server is serving the page's code directly and not executing the code.