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
388
votes
5 answers

What are the differences between WCF and ASMX web services?

I am totally confused between WCF and ASMX web services. I have used a lot of web services in my earlier stage, and now there is this new thing introduced called WCF. I can still create WCF that function as a web service. I think there will be…
shailesh
  • 5,013
  • 5
  • 23
  • 22
138
votes
5 answers

Difference between web reference and service reference?

What is the difference between web reference and service reference in WCF? Which is preferable in WCF?
Nirmal
99
votes
10 answers

Getting RAW Soap Data from a Web Reference Client running in ASP.net

I'm trying to trouble shoot a web service client in my current project. I'm not sure of the platform of the Service Server (Most likely LAMP). I believe there is a fault on their side of the fence as i have eliminated the potential issues with my…
Andrew Harry
  • 13,773
  • 18
  • 67
  • 102
71
votes
2 answers

Enable ASP.NET ASMX web service for HTTP POST / GET requests

I would like to enable a ASP.NET classic (ASMX) web service for HTTP POST and GET requests. I realise this can be done on a machine or application level by adding ...
Dean Bates
  • 1,927
  • 5
  • 25
  • 24
68
votes
17 answers

How to not serialize the __type property on JSON objects

Every object I return from a WebMethod of a ScriptService is wrapped into a JSON object with the data in a property named d. That's ok. But I don't want the additional __type property to be served to the client, since I do manual processing with…
Robert
65
votes
6 answers

How to let an ASMX file output JSON

I created an ASMX file with a code behind file. It's working fine, but it is outputting XML. However, I need it to output JSON. The ResponseFormat configuration doesn't seem to work. My code-behind…
doekman
  • 18,750
  • 20
  • 65
  • 86
59
votes
2 answers

Create an ASMX web service from a WSDL file

I have a WSDL file and I am trying to create a web service that conforms to the WSDL. I've created clients using WSDL files that consume an existing service, but I've never created a web service that needed to follow a specific WSDL. I've gone as…
dtc
  • 10,136
  • 16
  • 78
  • 104
58
votes
9 answers

What is the difference between an asp.net web method and a wcf service?

I'm new to .Net and do not understand the difference. Can someone point me in the right direction?
user29440
  • 580
  • 1
  • 5
  • 5
52
votes
10 answers

asp.net asmx web service returning xml instead of json

Why does this simple web service refuse to return JSON to the client? Here is my client code: var params = { }; $.ajax({ url: "/Services/SessionServices.asmx/HelloWorld", type: "POST", contentType:…
njr101
  • 9,499
  • 7
  • 39
  • 56
51
votes
6 answers

how to generate web service out of wsdl

Client provided me the wsdl to generate the web service.But when I used the wsdl.exe command it generated the .cs class out of it. I consumed that class in my web service and when I provided the wsdl to client it didn't match their schema. Actually…
alice7
  • 3,834
  • 14
  • 64
  • 93
43
votes
3 answers

Why global.asax Application_Error method does not catch exceptions thrown by ASMX service?

And how to fix it. I'd like to log every thrown exception for maintenance purpose.
caustic
  • 2,658
  • 3
  • 21
  • 13
37
votes
8 answers

Call ASP.NET PageMethod/WebMethod with jQuery - returns whole page

jQuery 1.3.2, ASP.NET 2.0. Making an AJAX call to a PageMethod (WebMethod) returns the full/whole page instead of just the response. A breakpoint on the page method shows it's never getting hit. I have the [WebMethod] attribute on my method, and…
Matt
  • 41,216
  • 30
  • 109
  • 147
35
votes
5 answers

Calling an ASP.NET server side method via jQuery

I'm trying to call a server side method from client side via jQuery. My code is as follows: Server side: using System.Web.Services; [WebMethod()] //[ScriptMethod()] public static void SendMessage(string subject, string message,…
Fermin
  • 34,961
  • 21
  • 83
  • 129
34
votes
7 answers

Web Services -- WCF vs. ASMX ("Standard")

I am working on a new project. Is there any benefit with going with a WCF web service over a regular old fashion web service? Visual Studio offers templates for both. What are the differences? Pros and cons?
jdiaz
  • 7,354
  • 12
  • 42
  • 51
34
votes
3 answers

Handle exceptions in web services with Elmah

Is there a way to globally handle exceptions in regular ASP.NET Web Service (asmx) using ELMAH like we do it in ASP.NET web site ?
mberube.Net
  • 2,120
  • 2
  • 29
  • 39
1
2 3
99 100