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
18
votes
5 answers

Application pool identity or Impersonation

(A question of similar vein has been asked before but both the question and the accepted answer do not provide the detail I am looking for) With the intention of running an asmx web service under a dedicated domain account what are the usage…
Pero P.
  • 25,813
  • 9
  • 61
  • 85
18
votes
3 answers

How to generate a WSDL file from a C# webservice

I've created a WebService like this: [WebService(Namespace = "http://ns")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class GroupManagerService : WebService { public GroupManagerService() { } [WebMethod] …
Stef Heyenrath
  • 9,335
  • 12
  • 66
  • 121
17
votes
2 answers

Why are Static Methods not Usable as Web Service Operations in ASMX Web Services?

I just wanna learn why I can't static web methods in web services ? Why is it restricted ? Can some body give me concise explanation of this.
Tarik
  • 79,711
  • 83
  • 236
  • 349
17
votes
5 answers

Why does WCF sometimes add "Field" to end of generated proxy types?

Basically, I have a server-side type "Foo" with members X and Y. Whenever I use Visual Studio's "Add Server Reference" then I see the WSDL and the generated proxy both append the word "Field" to all the members and change the casing of the first…
tavistmorph
  • 979
  • 3
  • 9
  • 8
16
votes
3 answers

Calling Task-based methods from ASMX

I have a recent experience I'd like to share that may be helpful to anyone having to maintain a legacy ASMX web service that must be updated to call Task-based methods. I've recently been updating an ASP.NET 2.0 project that includes a legacy ASMX…
Graham Watts
  • 629
  • 5
  • 14
16
votes
3 answers

Where do I set the CookieContainer on a Service Reference?

When adding WebService Reference to an ASMX Service on a .NET 2.0 project for example, var objService = new NameSpace.groupservices(); there exists, objService.CookieContainer = new System.Net.CookieContainer(); When adding ServiceReference to an…
user677607
16
votes
6 answers

Is there a way to restrict access to an ASMX Webservice, i.e. the asmx page and its WSDL?

I have a C# .net webservice that I need to restrict access to. I already require my consumers to use a username and password to call the service. But, is there a way to restrict access to the actual asmx page and the WSDL? I would need to…
Jon
  • 2,129
  • 7
  • 23
  • 31
16
votes
4 answers

How to access a web service with overloaded methods

I'm trying to have overloaded methods in a web service but I am getting a System.InvalidOperationException when attempting "Add Web Reference" in Visual Studio 2005 (here's the relevant snippets of code): public class FileService :…
John Adams
  • 4,773
  • 25
  • 91
  • 131
15
votes
5 answers

Issues rendering UserControl using Server.Execute() in an ASMX web service

Can anyone explain to why Server.Execute() is requiring my rendered UserControls to contain
tags (or alternately, what I am doing wrong that is making Server.Execute() require form tags in my UserControls)? I have created an ASMX service to…
Jeff Leonard
  • 3,284
  • 7
  • 29
  • 27
15
votes
3 answers

Call asp.net web service from PHP with multiple parameters

I'm using a method using SoapClient class in a php page to call a web service in an asp.net site. Here is the php code. $client = new SoapClient("http://testurl/Test.asmx?WSDL"); $params = array( 'Param1' => 'Hello', 'Param2' =>…
Felasfaw
  • 571
  • 2
  • 7
  • 20
15
votes
3 answers

PrincipalContext not connecting

I am attempting to use PrincipalContext for a webservice that I am developing. I have already been using forms authentication on the web server in a different application and it works fine. The error that I am recieving is…
PSinclair
  • 151
  • 1
  • 1
  • 4
15
votes
1 answer

Are asmx webservices compatible with REST?

I was just wondering are asmx files compatible with REST style requests? I have some asmx files which need to service some third-party programs which are setup to send REST requests, not SOAP.
chobo
  • 31,561
  • 38
  • 123
  • 191
15
votes
3 answers

What causes a difference between a web service URL and a namespace?

I have an ASP.NET web project that contains a Web Service. When I run the service it brings me to a page showing all the methods that are exposed, using a URL similar to http://api.example.com/game/service.asmx. In the code for the Web Service there…
chobo
  • 31,561
  • 38
  • 123
  • 191
15
votes
4 answers

Nullable param in asmx service method causes other method to fail

To recreate the issue I'm seeing, using VS2010, create an empty website and add a web service (asmx) with code-behind. Using the following code, both webmethods can be invoked successfully: [WebService(Namespace =…
heisenberg
  • 9,665
  • 1
  • 30
  • 38
15
votes
2 answers

Asmx web service basic authentication

I want to implement basic authentication using username and password validation in my asmx web service. I don't want to use WCF and I know this is not secure way, but I need to use basic authentication without using https. My web service is like…
Majid Shamkhani
  • 849
  • 2
  • 8
  • 28