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

ASMX Web Service using wrong encoding on incoming request

My .NET ASMX webservice is accepting requests from a client I don't have direct control over. It's sending a request that looks like this: POST /Service.asmx HTTP/1.1 Connection: Keep-Alive Pragma: no-cache Content-Length: 1382 Content-Type:…
pettys
  • 2,293
  • 26
  • 38
6
votes
2 answers

Check if a webservice exists

Could someone please be kind enough to show me the best way to determine if a webservice (ASP.NET) exists at a given URL? I assume an approach will be something along the lines of issuing a request using System.Net.Webclient but how could I…
Maxim Gershkovich
  • 45,951
  • 44
  • 147
  • 243
5
votes
1 answer

How do I make WebMethods serialize ExpandoObject

I have a WebMethod that looks like this which is used to populate a jqGrid [System.Web.Script.Services.ScriptService] public class MyWebService: System.Web.Services.WebService { [WebMethod] [Authorize(Roles = "Admin")] public object…
Sean Tomlins
  • 365
  • 3
  • 13
5
votes
2 answers

Shortening The Number Of Arguments In A Web Method Using jQuery AJAX

For this question, I'm using ASP.NET Web Forms in C#, a web service and jQuery. I read this post about using an array to pass in a bunch of parameters to a web method using jQuery AJAX. I'm wondering if it's possible to do the same thing without…
Halcyon
  • 14,631
  • 17
  • 68
  • 99
5
votes
1 answer

Web Service Proxy Code Generated by WSDL.exe Versus "Update Web Reference" - Should I Care?

Using Visual Studio 2010, we have a solution with several web sites (not web application projects) and command line and winforms projects. All target .Net 2.0. Many of the projects have web references to the ASMX web services in the web sites. The…
Tom Winter
  • 1,813
  • 3
  • 18
  • 23
5
votes
2 answers

Send SOAP Request from a specific IP address

I have a system with multiple IP address. But I'm allowed to initiate SOAP Request only from one IP address. How do I obtain that in VB.NET.
Akhil K Nambiar
  • 3,835
  • 13
  • 47
  • 85
5
votes
4 answers

How to remove d: and __type from JSON response for ASP web service

I've found several solutions for this on the web that are for WCF web service and not ASP web service. Currently, I'm getting back a JSON response that…
Nico
  • 51
  • 1
  • 1
  • 2
5
votes
2 answers

When to use a page method versus creating a web service?

Our team is trying to figure out some guidelines for using pagemethods vs. creating an actual asmx web service. Seems to me that pagemethods are primarily for one off type calls that are specific to the page, where as asmx are intended are intended…
Rob
  • 3,026
  • 4
  • 30
  • 32
5
votes
4 answers

How to use HttpWebRequest to call a Web Service Operation that takes in a byte[] parameter?

I am trying to call a [webmethod] from C#. I can call simple webmethod that take in 'string' parameters. But I have a webmethod that takes in a 'byte[]' parameter. I am running into '500 internal server error' when I try to call it. Here is some…
shergill
  • 3,738
  • 10
  • 41
  • 50
5
votes
3 answers

Call .Net 3.5 WCF service from .Net 2.0 Standard ASMX Web Service Client

I created a service that is hosted on a server that has .Net 3.5 installed and I need to call this service from a client that only has .Net 2.0 installed. Is there a way I can do this?
Melursus
  • 10,328
  • 19
  • 69
  • 103
5
votes
4 answers

SOAP header Action was not understood

I am trying to consume a webservice in C#. Whenever i try to call the function from the web service class I am getting a "SOAP header Action was not understood".I've added web reference[not service reference] pointing the web service in my…
logeeks
  • 4,849
  • 15
  • 62
  • 93
5
votes
2 answers

Why are my base class fields not being serialized when returning derived class object from an ASMX web method?

I have two classes and a web method as follows [Serializable] public class BaseClass { public int Key; public bool IsModified; public bool IsNew; public bool IsDeleted; } [Serializable] public class DerivedClass : BaseClass { …
logik6
  • 127
  • 1
  • 5
5
votes
1 answer

Is it OK to use a singleton ASMX web service proxy?

I am working with some legacy code written in .NET 3.5 using ASMX web services. A windows service (call it FooService) is statically caching an ASMX proxy for a web service (call it BarWS) that it calls in response to client requests around…
James World
  • 29,019
  • 9
  • 86
  • 120
5
votes
2 answers

Calling web methods from the same web service

I need to write a wrapper for a collection of web methods that are exposed in a particular web service. It makes sense to stick this new wrapper method in the same service since it's affecting the same type of object. Most of these web methods are…
C-Mart
  • 193
  • 8
5
votes
3 answers

ASMX Returning a pure string

I have an ASP.NET web service (.asmx). My service is defined like the following: [System.Web.Services.WebService(Namespace = "http://tempuri.org/")] [System.Web.Services.WebServiceBinding(ConformsTo =…
user208662
  • 10,869
  • 26
  • 73
  • 86