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
11
votes
6 answers

IgnoreRoute with webservice - Exclude asmx URLs from routing

Im adding the filevistacontrol to my asp.net MVC web application. I have a media.aspx page that is ignored in the routing with routes.IgnoreRoute("media.aspx"); This works successfully and serves a standard webforms page. Upon adding the…
boz
  • 419
  • 5
  • 15
11
votes
3 answers

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

How to resolve the above exception while invoking a .net web service (asmx) hosted on SSL ("https:") protocol from java using axis jars. Receving the following error message while executing the code: faultDetail: …
lakshmi K
  • 111
  • 1
  • 1
  • 3
11
votes
2 answers

How to pass a DateTime value to a WebMethod (ASMX)

I have a WebMethod with a parameter defined as DateTime. When I call that webservice, I get this error: at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() at …
Cleiton
  • 17,663
  • 13
  • 46
  • 59
11
votes
3 answers
11
votes
4 answers

Correct way to authorize an ASMX .NET web service from MVC 4 Project

I have an ASP.NET MVC application that has a .asmx web service I wrote an action filter attribute that I wanted to use on web methods on the web service, to check the Request headers for a UserID and Password, and throw an unauthorized response code…
Jimbo
  • 22,379
  • 42
  • 117
  • 159
11
votes
1 answer

Can I Set the HTTP Response Code & Throw an Exception on an ASMX JSON Service?

In an ASP.NET ASMX WebMethod that responds JSON, can i both throw an exception & set the HTTP response code? I thought if i threw an HttpException, the status code would be set appropriately, but it cannot get the service to respond with anything…
Markus
  • 518
  • 6
  • 18
10
votes
2 answers

Optional parameters in ASP.NET web service

I have a ASP.NET web service. This web service works fine. However, the WSDL lists some parameters as optional (minoccurs = 0) and others as non-optional. Some of the optional parameters are actually not optional, others which are marked as…
Thomas Lötzer
  • 24,832
  • 16
  • 69
  • 55
10
votes
4 answers

add web service reference from behind a proxy server

I'm using vs2010. In a simple console app I try to add a service reference to http://***/service1.asmx , old asmx service. My computer is behind a proxy server, so i get an error : "The remote server returned an unexpected response: (407) Proxy …
Nikita
  • 173
  • 1
  • 2
  • 16
10
votes
2 answers

C# extending SoapExtension -

Background: I'm trying to write a simple SoapExtension class to log inbound/outbound Soap messages from an asmx web service. Following this article on msdn, I have been able to get things working. However I'd really like to understand why/how it's…
MattDavey
  • 8,897
  • 3
  • 31
  • 54
10
votes
3 answers

Does .net 4.0 still support asmx

I Opened my .net 2.0 ASMX webservice in VS2010 and migrated to .net4.0. If i simply run my ASMX w/o changing te code to WCF format i can still run old asmx service under .net 4.0 ?? will this work as it is? My web.config file also has WSE settings…
Gauls
  • 1,955
  • 6
  • 28
  • 44
10
votes
3 answers

the type or namespace name 'webmethod' could not be found

I'm using jquery, ajax, & .net to call a method. I see lots of examples on the net saying to put [Webmethod] above the method but I'm keeping getting the error the type or namespace name 'webmethod' could not be found. I have put "using…
thegunner
  • 6,883
  • 30
  • 94
  • 143
10
votes
2 answers

What's the ASP.NET Webservice request lifecycle?

On a regular aspx page, I have events such as Page_Init, Page_Unload, etc., which occur in a well-defined order. I have an asmx page providing [WebMethod()]s. Do similar events exist? In particular, some events that allow me to initialize some data…
Heinzi
  • 167,459
  • 57
  • 363
  • 519
10
votes
2 answers

Webservice change method response without notifying clients

Let's assume I have a webservice which returns a class on all methods, informing the client the status of the process, for example: public class WsResult { string result; // either "error" or "ok" } Now we'd like to add a property to this…
MeanGreen
  • 3,098
  • 5
  • 37
  • 63
10
votes
3 answers

ASMX equivalent of Page_Init?

I have some code I would like to execute very early in the lifecycle of a call to an ASMX function. For our ASPX pages, this code is in the Page_Init() function on a base class, from which all our ASPX pages inherit. Is there an ASMX equivalent to…
mikemanne
  • 3,535
  • 1
  • 22
  • 30
10
votes
8 answers

An existing connection was forcibly closed by the remote host

I have a fat VB.NET Winform client that is using the an old asmx style web service. Very often, when I perform query that takes a while or pass a large amt of data to a web service in a dataset, I get the subject error. The error seems to occur in <…
Chad
  • 23,658
  • 51
  • 191
  • 321