How can I write an ASMX Webservice on SharePoint 2013, for example http://Sample/myWebService.asmx??

2 Answers 2


I have a detailed walkthrough that shows how to do this. The post was written for SharePoint 2010 but it will work for SharePoint 2013.

Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010

enter image description here

  • 1
    Please add more information to the post. Link-only answers are normally not happily received, and less so when linking to your private blog :) Apr 7, 2014 at 18:32
  • My answer stands as is. I will leave it up to the Stack Overflow community to decide if they like it or not with their votes. Apr 8, 2014 at 1:56
  • 4
    -1 Link Only Answer. Please don’t add just a link as answer to a question. If the link breaks, the answer you provided will not be useful for future visitors. Provide an answer of your own and use the link as reference. If needed, you can block quote the content from your link. More information is found in our help center, especially How do I write a good answer
    – Benny Skogberg
    Apr 8, 2014 at 6:12
  • Thaaank You, Rob! :)
    – Gennady G
    Mar 13, 2016 at 12:39

The simplest way is to write your web service code directly in asmx file and save it in:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\SomeFolder\MyWebService.asmx

Then you can call it like this:


It would be better, of course, to compile your web service, deploy the dll file in GAC, and then also copy asmx file to some location in Layouts folder as in my example.

  • notice that it is much easier to deploy to _layouts folder, rather than using _vti_bin, since on the latter you must manually create disco & wsdl files and edit spdisco.asmx
    – itsho
    Jan 20, 2015 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.