Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a asmx web service in C# using visual studio 2013

Hy,

how can I create a asmx web service in Visual Studio 2013?

I have found this short tutorial about that, but when I follow this in Visual Studio 2013 I get an error that says "the type 'Service1' could not be created".

Thanks for help :)

like image 343
Robert Jaskowski Avatar asked Nov 29 '13 08:11

Robert Jaskowski


People also ask

What is Asmx file Web Service?

ASMX provides the ability to build web services that send messages using the Simple Object Access Protocol (SOAP). SOAP is a platform-independent and language-independent protocol for building and accessing web services.

What is Web Service Example C#?

An XML Web service should be identified by a namespace that is controlled by its company. For example, a company's Internet domain name could be used as part of the namespace.


3 Answers

  1. Create Empty ASP.NET Project enter image description here
  2. Add Web Service(asmx) to your project
    enter image description here
like image 178
Damith Avatar answered Oct 23 '22 18:10

Damith


Short answer: Don't do it.

Longer answer: Use WCF. It's here to replace Asmx.

see this answer for example, or the first comment on this one.

John Saunders: ASMX is a legacy technology, and should not be used for new development. WCF or ASP.NET Web API should be used for all new development of web service clients and servers. One hint: Microsoft has retired the ASMX Forum on MSDN.


As for comment ... well, if you have to, you have to. I'll leave you in the competent hands of the other answers then. (Even though it's funny it has issues, and if it does, why are you doing it in VS2013 to begin with ?)

like image 24
Noctis Avatar answered Oct 23 '22 17:10

Noctis


on the web site box, you have selected .NETFramework 4.5 and it doesn show, so click there and choose the 3.5...i hope it helps.

like image 7
Kika_Fortez Avatar answered Oct 23 '22 18:10

Kika_Fortez