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


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

| improve this answer | |
  • 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 :) – Robert Lindgren Apr 7 '14 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. – Rob Windsor Apr 8 '14 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 '14 at 6:12
  • Thaaank You, Rob! :) – Gennady G Mar 13 '16 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.

| improve this answer | |
  • 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 '15 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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