I’m working with a website that has an asmx service with methods decorated like so:
[WebMethod(Description = "Search Method for items of type Foo.")]
[XmlInclude(typeof(SearchResults))]
public SearchResults[] FooSearch(//.....
There is another VS project that has a service reference to this asmx service. It also has a file named ‘Reference.cs’ in it with a boilerplate statement at the top that states it is an auto-generated file, etc. It has interface and partial class definitions like this:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class MyClass: UserAuthentication {
I now need to update the asmx service and add a few new methods. When I’m done, how can I convey these changes to the other project? Is it a matter of removing and re-adding the service reference, or do I need to run the asmx’s code-behind file through a wsdl compiler of some sort, and add the resulting file(s) to the project? I’ve never done this before so any help is appreciated.
That’s the simplest way to do it for sure.