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
7
votes
3 answers

Using NameValueCollection in C# webservice gives not XML serializable error

I am getting this error message when I try to "Add Web Reference" to my ASMX proxy project: **"To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.String) at all levels of their inheritance…
John Adams
  • 4,773
  • 25
  • 91
  • 131
7
votes
3 answers

WCF to ASMX binding much slower returning large data than standard web reference

I am binding to an existing ASMX web service using a WCF service reference. I have a method that returns a DataSet object that contains a string of 500k length. As a standard "old-school" web reference, calling this method takes around 2-3 seconds…
Duncan Watts
  • 1,331
  • 9
  • 26
7
votes
1 answer

.NET: How to deprecate a WebMethod?

In .NET, is there a standard way to indicate that a web service method has been deprecated? To clarify, by 'web service method', I mean a method that has been decorated with the [WebMethod] attribute. Is standard practice to just use the…
Dan Esparza
  • 28,047
  • 29
  • 99
  • 127
7
votes
2 answers

Catching a SoapException thrown by a WebService

I wrote the following service : namespace WebService1 { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class Service1 :…
Sharpac
  • 418
  • 3
  • 5
  • 13
7
votes
4 answers

calling asmx service using jquery ajax asp.net 4.0

I'm trying to call a sample asmx service using jquery, here is the jquery code $.ajax({ type: "POST", url: "/Services/Tasks.asmx/HelloWorld", data: "{}", dataType: "json", contentType:…
Sharique
  • 4,199
  • 6
  • 36
  • 54
7
votes
5 answers

ASMX web service to allow anonymous access

I am experiencing an authorization error for an asmx web service that I developed. The web service itself does not require any user credentials, but it seems like the web service is configured to enforce that, although I tried to set the…
chiccodoro
  • 14,407
  • 19
  • 87
  • 130
7
votes
3 answers

WCF vs ASPX webmethods vs ASMX webmethods

The intent is to create a set of web services that people can reuse. These services mostly interact with a backend DB creating, retreiving and processing data. We want to expose services so that people can use to create data mashups and other…
user529265
  • 820
  • 10
  • 27
7
votes
1 answer

Web Service proxy class to implement interface

I am looking for a way to have the generated proxy class for a Web Reference (not WCF) implement a common interface in order to easily switch between web service access and "direct" access to our business layer in the client application, something…
bernhof
  • 6,219
  • 2
  • 45
  • 71
7
votes
2 answers

Get current domain in ASMX

In C# in an asmx web service how do I get the current domain that the webservice was called on? HttpContext.Current.Request.Url.Host returns kindof what I want but instead of http://mydomain.com/Folder/Mywebservice.asmx I just need…
Matt
  • 1,562
  • 2
  • 17
  • 27
7
votes
4 answers

How to download file using JavaScript only

I have an only JavaScript page and .asmx page. I want to download file using only JavaScript how can I download the file. I want to download a particular resume. I am getting resume here, var res = data[i].resume;
amit
  • 429
  • 5
  • 8
  • 20
7
votes
3 answers

.Net code to catch an HTTP 500 error response from an .asmx web service

Is there a way to catch the HTTP 500 error returned by an .asmx web service from a .Net client? Using .Net 4.5 (VS2015), the .Net client code consumes the .asmx web service and calls it using the code below: var client = new…
Lenny
  • 333
  • 5
  • 19
7
votes
1 answer

Excessive HTTP 401s using Windows Authentication, AJAX, ASMX and external ISA

Enviornment: ASP.NET WebForms .NET 3.5 jQuery for AJAX ASMX web services Windows Authentication SSL When we run our production web application, our AJAX calls often have 2-3 HTTP 401s before we get our HTTP 200. Is this normal? Is there…
rick schott
  • 21,012
  • 5
  • 52
  • 81
7
votes
2 answers

Detailed solution for ASP.NET Error message 401.3 "Access is denied"

I just wrote a sample code for ASP.NET Web Application, using web service. The environment is Visual Studio 2015. My operation system is Windows 8. When doing debug, the webpage would not show the app from URLs. Rather it reports an error: " Server…
Curly
  • 539
  • 2
  • 7
  • 14
7
votes
1 answer

.net example of using client certificates in web service call?

I'd like to use client certificates to verify the identity of administrative callers to my web service. Then I can issue certificates only to the people I want to call my web service and be pretty sure noone else can call it. This is in a very…
Rory
  • 40,559
  • 52
  • 175
  • 261
7
votes
1 answer

In ASP.Net applications, can I get which security protocol (SSL3/TLS) the request contains?

I am trying to check from asp.net perspective what security protocol the client is using when trying to interact with my application. I have different applications hosted asp.net web application, asmx webservices, asp.net mvc, wcf services. Please…
Nagendra
  • 317
  • 2
  • 7