I wrote a ASP.NET web service that has 2 methods. These run fine and are shown in http://localhost:85/Services/NopService.asmx?WSDL
If I add another method, I cannot access the new one!
The according file is in D:\Web\NopCommerceStore\Services\NopService.asmx and ..asmx.cs No other file of that name anywhere!
If I simply add another method like:
[WebMethod]
public string Hi(string you)
{
return "Hi " + you;
}
and navigate to http://localhost:85/Services/NopService.asmx?WSDL the new method does not show up - even after: Restart IIS Clear temp.asp.net folder clear hash.web
How can I update my web service with a new method??
Thank you!
If you've copied the .asmx file from another project, be sure to change the namespace in both the codebehind file AND the markup (right click the .asmx file and choose "View Markup").
Otherwise, the markup file will have a Class attribute that points to the previous project. And if that previous project still exists on your system, its methods will be referenced regardless of what you have done in your new codebehind file.
recompile your web service code then update its reference inside the project call it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With