The name starts with an invalid character.

"The name starts with invalid characters. It is an error to process http: //localhost/webservice/test.aspx"

Solution to the problem:

I just learned webservices, and I don't understand many things. Write the simplest example, press ctrl + F5 directly to run under vs2005, but copy to the iis directory to execute but it prompts an error
[name starts with invalid characters. Error processing resource 'http: //localhost/ws/Service.asmx'. Line 1, position: 2]
really do not know why, no way wantonly search the web, and finally find a solution
to run
C: /WINDOWS/Microsoft.NET/Framework/v2.0.50727/aspnet_regiis.exe -i
That's it.
But what tool is aspnet_regiis.exe?
The following is the explanation given by msdn:
    ASP.NET IIS registration tool (Aspnet_regiis.exe)

    When multiple .NET Framework versions are executed in parallel on a computer, the version of ASP.NET ISAPI mapped to an ASP.NET application determines the version of the common language runtime (CLR) used by the application. Using the ASP.NET IIS registration tool (Aspnet_regiis.exe), administrators or installers can easily update the script mapping of ASP.NET applications to point to the ASP.NET ISAPI version associated with the tool. The tool can also be used to display the status of all installed ASP.NET versions, register the ASP.NET version coupled with the tool, create client script directories, and perform other configuration operations.

    The parameter i means:

    Install the ASP.NET version associated with Aspnet_regiis.exe, and update the root directory of the IIS metabase and the script mapping under the root directory.

    Only update script maps for applications that use earlier ASP.NET versions. Applications using the new version are not affected.

I said that it is to register asp.net on the local IIS, so that the asp.net webpage can be executed, and when creating the webservices project, it is not the establishment of asp.net webservices, so just register.

 

Published 28 original articles · Like 15 · Visits 110,000+

Guess you like

Origin blog.csdn.net/z3h0a5n8g8x9i9a2o3/article/details/8548997