We received a VS2010 solution containing an asmx.cs file, this file contains WebMethods. I would like to add a new WebMethod to this file. I copied and renamed an existing method but I cannot access it.
Searching for names identical to the existing methods I found auto-generated code inside a Reference.cs file and a .wsdl file. I don't understand how this code was generated, is this the result of a class wizard or something similar?
Please read Adding and Removing Web References article on MSDN. You have modified the service, to reflect the changes in client project you will need to update the reference of the service.
To refresh a Web reference
Right-click on the Web reference in Solution Explorer and select Update Web Reference from its shortcut menu.
This will regenerate the proxy class for the Web service, using the latest copy of its .WSDL description file. Any methods listed in the refreshed proxy should be available from the current version of the Web service.
As you mentioned that you changed the name of function, your build might break in the client project.