Create a new project (the web service).

  1. Create a new ASP.NET Empty Web Application project inside your solution.
  2. Right click on the newly created project and select Add > Web Service (ASMX) (or Add > New Item and find it).
  3. Create the methods you need inside of it. Don’t forget to add [WebMethod] above the method you want to use.
  4. When you are happy with it, right click the ASMX file and select View in Browser.
  5. In the browser, select and copy the location to the WS (in my case http://localhost:65057/WebService.asmx).

Add a reference to the old project.

  1. Right click on the old project and select Add > Service Reference.
  2. Paste the URL you copied to the Address field and click on Go, you should see the WS and the methods you exposed.
  3. Click on OK and you’re done.

Use the Web Service.

var ws = WebServiceSoapClient();
// WebService is the class name inside your WebService.asmx file.
ws.MethodName();

Or, even better:

private WebServiceSoapClient _webServiceSoapClient;
WebServiceSoapClient WebService
{
    get
    {
        if (_webServiceSoapClient == null)
        {
            _webServiceSoapClient = new WebServiceSoapClient();
        }
        return _webServiceSoapClient;
    }
}

var something = WebService.MethodName();

If you update your Web Service remember to right click on the Service Reference and select Update Service Reference (you might need to have the server running before by viewing the asmx file in your browser).

Sixteen steps that will definitely save you a lot of time if you’re working with workflows, especially the more complex ones.

Saved me a lot of trouble at work, I had to clone a list along with all of it’s workflows to another site.

Saving the list as template helped me move everything (including all of the custom made forms!), while the workaround below made it possible to simply import the workflows I had in place into the new list!

Click here to see the step by step tutorial.