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
1 answer

ASMX webservice - return JSON instead of XML

I have a web service that contains one method: [WebMethod] public string Movies() { using (var dataContext = new MovieCollectionDataContext()) { var query = dataContext.Movies.Select(m =>new{m.Title,m.ReleaseDate}).Take(20); …
Haseeb Khan
  • 930
  • 3
  • 19
  • 41
6
votes
2 answers

Getting Exception Details from ASP.NET PageMethods on the Client SIde

I am having a pagemethod to which i give a call from my JavaScript say Pagemethods.MyMethod(MyParameter, onsucess, onfailure); In the Code behind, I have something like this: [WebMethod] public static void MyMethod(Param) { try{ …
SudheerKovalam
  • 628
  • 2
  • 7
  • 13
6
votes
1 answer

Return JSON from ASMX web service, without XML wrapper?

I need to get Json data from a C# web service. I know there are several questions based on this, trust me I have read through quite a few but only to confuse me further. This is what I have done : In my web service I have included :…
Praneeta
  • 1,554
  • 3
  • 19
  • 20
6
votes
3 answers

What is the difference between a web reference and a service reference?

What is the difference between a web reference and a service reference?
Worz
6
votes
2 answers

Integer value is lost in web service call

I have an application that makes a web service call to get the URL of an MSI depending on whether the user's computer is 32bit or 64bit. The call GetURLByOS takes 2 methods (1. string AuthenticationInfo , 2. int osBit). As I'm debugging, I can see…
Monkey
  • 220
  • 1
  • 3
  • 11
6
votes
2 answers

Can ASMX be configured to respond to an HTTP 1.1 OPTIONS request?

It seems that ASMX implicitly does not allow the OPTIONS verb. I'm posting this question because I'm using jQuery AJAX calls with POST which first queries the server for available OPTIONS before the POST verb** is issued. By default Web.config maps…
John K
  • 28,441
  • 31
  • 139
  • 229
6
votes
3 answers

Things to consider while calling one WCF service from another

We are migrating set of WSE services to WCF platform. The new WCF services are called over secured HTTP. (https) I want to invoke an operation contract of one WCF service from another. Both the services are mostly hosted in the same IIS, but they…
Learner
  • 4,661
  • 9
  • 56
  • 102
6
votes
2 answers

Preventing serialization of properties in VB.NET

I have a VB.NET class which I'm serializing via XML in an asmx file. I've added attributes to the datamember I want to ignore in serialization, but it's still returned. I also have the attribute on my class and the DataMember…
Echilon
  • 10,064
  • 33
  • 131
  • 217
6
votes
4 answers

Why am I getting two log files per day using log4net with ASMX web service?

I have a ASMX web service running IIS 10 and have added log4net to the project with the following configuration:
neildt
  • 5,101
  • 10
  • 56
  • 107
6
votes
3 answers

Block cross domain calls to asp.net .asmx web service

I've built an application that uses jQuery and JSON to consume an ASP.NET .asmx web service to perform crud operations. The application and .asmx are on the same domain. I dont mind people consuming the read operations of the .asmx remotely but dont…
jdee
  • 11,612
  • 10
  • 38
  • 36
6
votes
2 answers

Methods with Nullable Types not working in ASMX Web Service using GET

I have an ASMX Web Service set up to use the HTTP GET method. Simple methods which take basic String and Int parameters are working ok, and I can call MyService.asmx/MethodName?Param=Value and get a response back in XML. However, when I have a…
TimS
  • 5,922
  • 6
  • 35
  • 55
6
votes
7 answers

webservices trace / log

I have set of web services and I want to add a trace layer. I don't want to modify each web service since I have many. I would like to write log every entering to a web service: name of web service and parameters. What is the best way to do so? P.S.…
Naor
  • 23,465
  • 48
  • 152
  • 268
6
votes
1 answer

How to access asmx service in asp.net core

I have created an asp.net core application to create a web API. I have to create a service reference to an asmx service. But I don't see any provision to create an asmx service reference. Any reference to a documentation will be highly…
user4072848
  • 61
  • 1
  • 3
6
votes
5 answers

Why, when adding a service reference in VS2010, is the client class not generated?

I'm going insane, I beleive. That is, I've never had an issue like this before, and nobody (that Google has indexed) seems to be having the same issue. Whenever I add a reference to a particular ASMX service to a VS2010 project, all of the code is…
John Gietzen
  • 48,783
  • 32
  • 145
  • 190
6
votes
1 answer

Unable to call .NET ASMX from PHP

I have the following - currently hosted - SOAP service that was created in .NET that I'm trying to call from PHP: POST /ExampleService/ExampleService.asmx HTTP/1.1 Host: dev.examplesite.com Content-Type: text/xml; charset=utf-8 Content-Length:…
maGz
  • 787
  • 3
  • 8
  • 25