Getting Error while Adding Web Service reference in asp.net project
-
Hi friends, While adding the web service(ie., *.asmx) file into a new asp.net web project i am getting the following error. It is showing the error at the first letter "<@". Can you tell me how to resolve this. The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A name was started with an invalid character. Error processing resource 'http://localhost/MyWebProjects/WebSite1/Service.as... <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="WService.Service" %> -^
VijayaRam
-
Hi friends, While adding the web service(ie., *.asmx) file into a new asp.net web project i am getting the following error. It is showing the error at the first letter "<@". Can you tell me how to resolve this. The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A name was started with an invalid character. Error processing resource 'http://localhost/MyWebProjects/WebSite1/Service.as... <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="WService.Service" %> -^
VijayaRam
-
Open the .net command prompt and run the following commands: 1) aspnet_regiis.exe –i 2) aspnet_regiis.exe –e and finally restart the IIS
Gautham
As you told,i have done, but no use, I think the error may be in asmx file. it is telling file cannot begin with % character. Do you know how to register the asmx file in the project. Thanks in advance. this is the error: The document at the url http://localhost/MyWebProjects/WebSite1/Service.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - 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. - Report from 'XML Schema' is 'Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2.'.
VijayaRam
-
As you told,i have done, but no use, I think the error may be in asmx file. it is telling file cannot begin with % character. Do you know how to register the asmx file in the project. Thanks in advance. this is the error: The document at the url http://localhost/MyWebProjects/WebSite1/Service.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - 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. - Report from 'XML Schema' is 'Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2.'.
VijayaRam
-
Hi friends, While adding the web service(ie., *.asmx) file into a new asp.net web project i am getting the following error. It is showing the error at the first letter "<@". Can you tell me how to resolve this. The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A name was started with an invalid character. Error processing resource 'http://localhost/MyWebProjects/WebSite1/Service.as... <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="WService.Service" %> -^
VijayaRam