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
9
votes
4 answers

Integrating FedEx Web Services into .Net, stuck at step 1

I'm signed up, I've downloaded sample code, I've got a WSDL...and yet I have no idea how to get this stuff into my existing .Net application. The WSDL was in a zip file, not a URL so I can't just "Add Web Reference." I've run the wsdl tool from…
Matt Dawdy
  • 19,247
  • 18
  • 66
  • 91
9
votes
3 answers

Inherited properties do not appear in soap sample on asmx file

I have two classes, WebServiceRequest and OrderRequest. Each class has properties. OrderRequest inherits from WebServiceRequest - like so: public class WebServiceRequest { private string mAuthenticationToken; public string…
Grinn
  • 5,370
  • 38
  • 51
9
votes
7 answers

Send JSON to webmethod?

How can i send a JSON object to a webmethod using jQuery?
Hannoun Yassir
  • 20,583
  • 23
  • 77
  • 112
9
votes
3 answers

Catch Custom Exception from ASMX Web Service

I have a web service in which I have created a custom exception. Let's say the name of this exception is InvalidContractException. What I would like to do is if a specific step occurs, I want to throw this exception. However, I can't figure out…
Justin Balvanz
  • 1,186
  • 3
  • 12
  • 19
9
votes
2 answers

ASMX Web service not serializing abstract base class

I have an abstract class. Let's call it Lifeform. It looks something like: public abstract class Lifeform { public virtual int Legs { get; set; } public virtual int Arms { get; set; } public virtual bool Alive { get; set; } } (The…
Jack Lawson
  • 2,479
  • 3
  • 23
  • 24
9
votes
8 answers

Asmx web service returning xml instead of json, Trying to remove from service output

I have been looking for 100's of links for last 3 hours eg adding scriptfactory to webconfig, 3 mistakes, setting content type etc. I am not able to figure out what actually the mistake is. Environment: Service running on .net 4.0 Web application…
Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286
8
votes
2 answers

How to call WebMethod?

I am trying to call a WebMethod from JavaScript. So far I have: The EMSWebService.asmx: namespace EMSApplication.Web.WebServices { /// /// Holds the Webservice methods of EMSApplication [WebService(Namespace =…
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
8
votes
7 answers

ASMX webservice not returning JSON, can only POST using application/x-www-form-urlencoded contentType

I can call my webservice using jQuery IF the contentType = "application/x-www-form-urlencoded; charset=utf-8" This will, however, return the xml: [myjson] If I try to POST to the service using "application/json; charset=utf-8" I…
Steve Ruiz
  • 259
  • 1
  • 3
  • 12
8
votes
3 answers

IIS 7 Logging Web Service methods

I have a web service (not a WCF service) hosted under IIS 7, the web service has two methods: method1, and method2. I am looking to differentiate between the requests for method1, versus the requests for method2, without modifying the web service…
8
votes
3 answers

ASMX username and password security

I have a basic ASMX service that I'm trying to get running (I'd rather use WCF but can't get the server to work with it). It runs fine in a no security setup but as soon as I turn on security I get: The HTTP request is unauthorized with client…
BCS
  • 75,627
  • 68
  • 187
  • 294
8
votes
2 answers

How to create a web.config file to get SoapExtension loading?

I need to use a SoapExtension subclass (which I have created), but it seems that this class can only be initialized through a web.config file. I have read that it should be possible through app.config file, but I don't know how to do it that…
soleshoe
  • 1,215
  • 2
  • 12
  • 16
8
votes
3 answers

POST JSON data to .asmx webservice

I'm trying to post some simple parameters to a .asmx webservice. I get the following error: Request format is invalid: application/json; charset=utf-8. What I really need to get to is to be able to pass a complex object, but I can't get past making…
swandog
  • 159
  • 1
  • 2
  • 6
8
votes
2 answers

How do you pull the URL for an ASP.NET web reference from a configuration file in Visual Studio 2008?

I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary. I know I've done this before, but can't seem to…
Ian Robinson
  • 16,892
  • 8
  • 47
  • 61
8
votes
2 answers

asp.net .asmx web service ishow XXE vulnerability - External DNS

We have uncovered an XML External Entity vulnerability in our asp.net asmx web service. We are testing an asp.net .asmx web service using burp suite, to check for XML External Entity Processing vulnerabilities.…
user10102158
  • 81
  • 1
  • 3
8
votes
3 answers

Can I stop service reference generating ArrayOfString instead of string[]?

I have a web method with a signature like this: public string[] ToUpper(string[] values) I am using the 'Add Service reference' in Visual Studio 2010 to generate a reference to my service. Unfortunately, this process creates a proxy class called…
Luke Baulch
  • 3,626
  • 6
  • 36
  • 44