Questions tagged [asmx]

The web service technology from .NET 1.0, now considered a "legacy technology".

The web service technology from .NET 1.0, currently considered a "legacy technology". For new development of web services or web service clients the use of Windows Communication Framework (WCF), ASP.Net Web API or other modern frameworks is recommended.

The ASMX Web Service technology was introduced with .NET 1.0 as "ASP.NET Web Services", and has also been called "XML Web Services". The term "ASMX" refers to the file type of the web service endpoints, such as WebService1.asmx. Note what Microsoft says about their ASMX Forum:

This forum has been retired. It is locked, but is still available for review in the Archived Forums folder. Any future posts on this topic should be put in the Windows Communication Foundation, Serialization, and Networking forum.

ASMX Web Services only support SOAP or JSON over HTTP or HTTPS, and have limited extensibility.

Important ASMX Questions

Other Obsolete Technologies

Web Service Extensions, or WSE were a set of stopgap releases that added to the ASMX technology to permit developers to work with the emerging WS-* standards as they were being developed by the industry. That means you will often find WSE mentioned in conjunction with security. This does not mean that WSE is the solution to security in web services, it means that WSE was that solution until WCF was released. WCF supersedes WSE, which is now obsolete. In fact, WSE is not supported on Windows 2008 or later releases, and is not supported by Visual Studio 2008.

Even more obsolete is the SOAP Toolkit. This was a way to create clients for web services, and worked for old VB or ASP applications. Do not use it.

2830 questions
5
votes
2 answers

return multiple rows from an asmx service

I have a web service method which i'd like to return multiple rows from a datatable. I am familiar with returning values from web service methods but not multiple rows from a datatable. What is the best way to go about doing this? Do I need to…
tmutton
  • 1,091
  • 7
  • 19
  • 42
5
votes
3 answers

what is difference with WCF and other web services?

I'm confused with WCF and other web services (such as asp.net ASMX,.net Remoting),can anybody tell me what is difference with WCF and the others and when should I use it, thanks!
leo
  • 1,043
  • 2
  • 11
  • 8
5
votes
2 answers

Web service refuses to receive parameters and reply in JSON

I'm trying to call a web service (.asmx) from a c# application, in json format. When I specify request method as GET, and don't specify contentType. (req is HttpWebRequest) req.Method = "GET"; Everything works well, but I get XML…
Oren A
  • 5,870
  • 6
  • 43
  • 64
5
votes
2 answers

ASMX Web Service - Return user defined class with properties

Hey, I am trying to return a user defined class from a web method. The class has properties and/or methods. Given the following web method: [WebMethod] public List GetMenu() { List menuItemList = new List();…
Mikey
  • 115
  • 1
  • 2
  • 6
5
votes
6 answers

How to remove extra result tag from my SOAP response

I know this questions has been asked before but I could not find my answer anywhere. the thing is I have below code on my asmx file: namespace IrancellSmsServer { [SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)] …
5
votes
2 answers

Creating web service and client with shared types

I have created two wsdl files with shared types imported from xsd schema file. After that I have created web services using interface generated by wsdl.exe tool with parameter /serverInterface. Frist web service, have web method “RegisterData” with…
Siekiera
  • 63
  • 1
  • 6
5
votes
3 answers

Custom DateTime XML Serialization

I would like to be able to Serialize a DateTime with a specific Time Zone that is not the server, nor is it client time. Basically, any time zone. Is it possible to override the DateTime serialization, in .Net2.0 webservices? I compile an xmlschema…
david valentine
  • 4,625
  • 2
  • 21
  • 15
5
votes
1 answer

Web API beside ASMX in the same project?

I have some web services in a asp.net web application using asmx. as it goes I need to provide more web services here and I'm going to use Web API instead of traditional asmx. the question is, Can I have these to types of web service in the same…
vaheeds
  • 2,594
  • 4
  • 26
  • 36
5
votes
2 answers

Programmatically call webmethods in C#

I'm trying to write a function that can call a webmethod from a webserive given the method's name and URL of the webservice. I've found some code on a blog that does this just fine except for one detail. It requires that the request XML be provided…
hancock
  • 53
  • 1
  • 1
  • 3
5
votes
2 answers

WCF streaming on asmx?

I've got wcf service for wcf straming. I works. But I must integrate it with our webserice. is there any way, to have webmethod like this: [webmethod] public Stream GetStream(string path) { return Iservice.GetStream(path); } I service is a class…
user278618
  • 19,306
  • 42
  • 126
  • 196
5
votes
4 answers

How do I return pure XML from asmx web service?

I want an asmx webservice with a method GetPeople() that returns the following XML (NOT a SOAP response): Sara Smith
User
  • 62,498
  • 72
  • 186
  • 247
5
votes
1 answer

Calling a Web service inside sql server

I have a web-service with the following methods (c#): [WebMethod] public string HelloWorld1(string a) { return "Hello World - " + a.ToString(); } [WebMethod] public string HelloWorld2() { return "Hello…
Alan
  • 51
  • 2
5
votes
1 answer

ASMX Web Service "Server did not recognize the value of HTTP Header SOAPAction"

I have a strange problem happening only when deploying an ASMX web service on the test server. I have a web service with one simple method: [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo =…
AshesToAshes
  • 937
  • 3
  • 14
  • 31
5
votes
2 answers

XMLHttpRequest ::ERR_CONNECTION_RESET while uploading large (2 Mo & More) files

Problem I'm trying to upload file using XMLHttpRequest and it seems to work only with small file (such as under 2MO of size). I tried many things so far and came to code shown at the end of the post. But, there is nothing to do; I keep getting the…
Simon Dugré
  • 17,980
  • 11
  • 57
  • 73
5
votes
2 answers

best way to consume a webservice in an asp.net code behind

I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this?
Cameron A. Ellis
  • 3,833
  • 8
  • 38
  • 46