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

Capturing SOAP requests to an ASP.NET ASMX web service

Consider the requirement to log incoming SOAP requests to an ASP.NET ASMX web service. The task is to capture the raw XML being sent to the web service. The incoming message needs to be logged for debug inspection. The application already has its…
p.campbell
  • 98,673
  • 67
  • 256
  • 322
29
votes
3 answers

Request format is unrecognized for URL unexpectedly ending in '/Convert' happens after 1-2 days

I'm calling a webservice using an Microsoft.XMLHTTP call: var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("POST", "/xxx/Converter.asmx/Convert", false); xmlhttp.setRequestHeader("Content-Type",…
Brian Pedersen
  • 371
  • 1
  • 3
  • 6
29
votes
2 answers

Intercept SOAP messages from and to a web service at the client

I have a client that communicates with a web service. The class that I communicate with is a C# class that is generated through wsdl.exe. I now want to log all incoming and outgoing messages. What I've done so far is to write a class that inherits…
trabart
  • 377
  • 1
  • 3
  • 6
26
votes
3 answers

ASMX Dependency Injection and IoC

So i have gotten stuck while trying to get my asmx webservice to use dependency injection and using an IoC to do it. I want my webservice to be able to use my internal business layer services. The webservice is to be used by an external client from…
limlim
  • 395
  • 1
  • 6
  • 14
25
votes
2 answers

Possible to invoke ASMX service with parameter via url query string?

I've got a asmx service that takes a single int parameter. I can open the URL to the service and see the service description screen. From here I can enter the query parameters into a form and invoke the web service. Is there any way to invoke a web…
Alex
  • 3,099
  • 6
  • 41
  • 56
24
votes
7 answers

ASMX Web Service slow first request

I have a bunch of .NET Webservices running in one IIS Application. These webservices are consumed by another IIS Application (frontend). The first call is pretty slow, about 5 to 10 seconds. After that it’s just milliseconds. The first call is…
Remco Eissing
  • 1,275
  • 2
  • 12
  • 15
24
votes
8 answers

calling an ascx page method using jquery

I know that I can call a page method with jquery using the following syntax $.ajax({ type: "POST", url: "Default.aspx/GetDate", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { //…
codette
  • 12,343
  • 9
  • 37
  • 38
24
votes
3 answers

Is there some way to handle async/await behind an ASMX service?

I have a web app serving a WCF REST API for JSON and an ASMX web service. The application has been around for a few years. It's based on ASP.NET 2.0, but upgraded to .NET 4.0 a couple of years ago, and I just upgraded to .NET 4.5 to be able to use…
Barslett
  • 286
  • 1
  • 2
  • 5
23
votes
1 answer

How to send/receive SOAP request and response using C#?

private static string WebServiceCall(string methodName) { WebRequest webRequest = WebRequest.Create("http://localhost/AccountSvc/DataInquiry.asmx"); HttpWebRequest httpRequest = (HttpWebRequest)webRequest; …
Sri Reddy
  • 6,832
  • 20
  • 70
  • 112
21
votes
3 answers

Forcing ASP.net webservice to return JSON

I have an ASP.net web service that I'm using for a web application which returns a either XML or JSON data to me, depending on the function I call. This has been working well thus far, but I've run into a problem. I want to create an "export" link…
Toji
  • 33,927
  • 22
  • 105
  • 115
20
votes
5 answers

ASMX service works on development server, returns 404 when deployed to IIS 7.5

I have a web application in ASP.NET 4.0. I've added an asmx service, primarily as a source for the autocomplete extender's lookup values. When I debug on my machine locally, everything works fine. However, when I deploy the web application to IIS…
rsteckly
  • 1,952
  • 3
  • 23
  • 35
20
votes
2 answers

How much effort is required to convert an ASMX to WCF web service?

I have 2 web services with about 6 web methods in total, most of the code is ofc sitting in assemblies any way, and the web service asmx is really just calling these assembly methods and returning their return type. How much effort is it to convert…
JL.
  • 78,954
  • 126
  • 311
  • 459
19
votes
8 answers

Calling ASMX from jQuery

I am trying to call an ASMX method from jQuery without success. Following is my code, and I don't understand what I am missing. File Something.js, function setQuestion() { $.ajax({ type: "POST", data: "{}", dataType:…
ebeworld
19
votes
8 answers

"Could not create type XXXX" when accessing a .asmx page on IIS 7.0

I have this error message when I'm trying to access a .asmx file on my Web browser. The message is the following: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific…
GDICommander
  • 1,273
  • 3
  • 15
  • 27
19
votes
8 answers

Call non-static method in server-side from client-side using JavsScript

How do I call a non-static method in server side(aspx.cs) from client side using javascript (aspx)....? As far as I know I can call static method in server side from client side... server side: [WebMethod] public static void method1() { …
Pramulia
  • 191
  • 1
  • 1
  • 3