Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Getting Error while Adding Web Service reference in asp.net project

Getting Error while Adding Web Service reference in asp.net project

Scheduled Pinned Locked Moved ASP.NET
csharpxmlasp-nethelptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VijayaRam
    wrote on last edited by
    #1

    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

    G S 2 Replies Last reply
    0
    • V 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

      G Offline
      G Offline
      gauthee
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • G gauthee

        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

        V Offline
        V Offline
        VijayaRam
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • V 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

          G Offline
          G Offline
          gauthee
          wrote on last edited by
          #4

          I read somewhere that it could be a problem with the machine.config. I guess in machine.config you have a add verb tag, make sure this tag is not uncommented!! i will search for the solution too if it does not work.

          Gautham

          1 Reply Last reply
          0
          • V 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

            S Offline
            S Offline
            santosh d
            wrote on last edited by
            #5

            register .asmx extention in your IS

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups