asmx

Error calling webservice from JQuery

I have a strange problem when I'm trying to call a simple webservice method from Jquery. Locally it works fine, but on my test-server it does not. The jquery request looks like this (only showing the actual request and not the rest of the method): $.ajax({ type: "POST", url: "/Service/Service.asmx/AddTab", data: "tab="...

I have a asmx webservice , I want to return the xml from a stored proc.

Im using Linq to SQL I have a stored procedure that is returning xml . ie im using for xml outo ,elements that works fine. what I want to do is expose the result of the stored procedure via a webservice. Here is some pseudo code: if some could help me replace the ?'s [WebMethod] public ? myMethod( int custID) { var myCust = d...

Add the path _vti_bin/Lists.asmx to an ASP.NET MVC 2 web application

I am trying to add the path /_vti_bin/Lists.asmx to my ASP.NET MVC 2 web application. I am registering the route as follows: routes.IgnoreRoute("{resource}.asmx/{*pathInfo}"); routes.Add(new Route("_vti_bin/Lists.asmx", new ListsHandler())); where ListHandler is defined as: public sealed class ListsHandler : IRouteHandler { #reg...

ASMX Web Services with SOAP Extension

I am in the process of setting up a web service for an external client to connect to my client's application and update some information. I went the ASMX route (the rest of the application runs on WCF) because I knew the external client could be very difficult to deal with and I was trying to keep everything as simple as possible. They a...

ASP.NET web services leak memory when (de)serializing disposable objects?

In the following two cases, if Customer is disposable (implementing IDisposable), I believe it will not be disposed by ASP.NET, potentially being the cause of a memory leak: [WebMethod] public Customer FetchCustomer(int id) { return new Customer(id); } [WebMethod] public void SaveCustomer(Customer value)...

How do I design a web service (microsoft) that can be consumed by multiple end points?

My company is planning to implement a solution in multiple applications that will help to validate mailing addresses at the point of data entry. We're using UPS's Extended Address Validation (XAV) web service API to validate the addresses. Our current plan is to build a .NET web service that can be used to communicate between our appli...

ASMX web service, external WSDLs *without* wsdl.exe

I'm working on some legacy code, and I need an asmx to implement a particular wsdl, which is being provided to me. I would like to receive the root element of the message as either an XmlDocument or XmlNode, rather than the wsdl.exe generated object graph. Is this even possible? ...

how do I make URI of dynamic web reference look in web.config instead of app.config?

I have a class library(DLL) which has a web reference, its dynamic. I have copied the setting into the applicationSettings of the web.config but still it keeps referring to the old URI I had set during develoment. any idea how i can make it take the URI of the web-service from the web.config? ...

call web methods directly from other project

I am working with .NET solution project and there are a couple projects in side of the solution. One of projects has asmx file. Now, my question is that is it possible to call web methods in the asmx file directly from other projects in same solution instead of adding web reference of it? Thanks. ...

Attempting to call an external webservice from ASP.NET returns a 401 - DefaultCredentials empty

Fails: //Note: webserviceProxy inherits from SoapHttpClientProtocol //App Pool is running as a user with permissions to call the external webservice var webserviceProxy = new webServiceProxy(); webserviceProxy.PreAuthenticate = true; webserviceProxy.UseDefaultCredentials = true; var returnVal = webServiceProxy.DoSomething(); //Fails...

ASMX Web Service online works when all of the code is in one file without code-behind

I have an ASMX Web Service that has its code entirely in a code-behind file, so that the entire contents of the .asmx file is: <%@ WebService Language="C#" CodeBehind="~/App_Code/AddressValidation.cs" Class="AddressValidation" %> On my test machine (Windows XP with IIS 5), I set up a virtual directory just for this ASP.NET 2.0 solutio...

How do I return pure XML from asmx web service?

I want an asmx webservice with a method GetPeople() that returns the following XML (NOT a SOAP response): <People> <Person> <FirstName>Sara</FirstName> <LastName>Smith</LastName> </Person> <Person> <FirstName>Bill</FirstName> <LastName>Wilson</LastName> </Person> </People> How can I d...

ASMX Test page displays HTTP POST as option when viewed from local machine but not remotely?

The auto-generated test page displays HTTP POST as option when viewed from local machine but not remotely. Why? How do I get it to display HTTP POST as an option? ...

When calling a asmx service via jqeury, how to pass arguments?

How can I pass my service endpoint parameters? (pagesize in this case) My .asmx service method looks like: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public List<Object> GetData(int pageSize) { } When I call this via jQuery like: $.ajax({ type: "POST", url: "test.asmx/test123",...

WSDL unable to import binding

I'm not able to get WSDL to work, it giving me this error: C:\Program Files\Microsoft.NET\SDK\v2.0\Bin>wsdl.exe /username:NOTGIVINGU/password:THEPASSWORD /v /parsableerrors http://www.stoysnet.com/stn_mfg/link/soap.php?wsdl WSDL: error WSDL1: Unable to import binding 'Product' from namespace 'http://www.stoysnet.com/stn_mfg/link/soap.p...

IoC with ASMX Like you can in WCF?

Can ASMX have an IOC like WCF? Basically I want to be able to inject my dependacies into the ASMX web service. is this possible and if so how. WCF way (somthing like this would be awesome) http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/07/29/integrating-structuremap-with-wcf.aspx many thanks ...

Why .NET ASMX web service on secure.site.com can't be called from www.site.com?

Hello, We have a web service on https://secure.site.com/service.asmx it works fine from https://secure.site.com/consumer.html but when we try to use it from https://www.site.com/consumer.html we can't do it. Getting 403 error. I'ts probably something related to webservice security (because of different subdomains) but I can't figure o...

How can I expose a 3rd party's enum through my asmx?

Given: An asmx web service. A 3rd party dll that contains a useful enum. Question: How can I expose this enum through my web service without having to repeat myself and re-type the enum's members in my webservice's public class? ...

WCF Service instead of ASMX Web Service?

I'm writing a SOAP Server that will act as an endpoint for an external client. The external client expects SOAP 1.1. I'll be taking embedded business objects in the SOAP messages and passing them to an internal application, getting responses back and responding with SOAP messages to the eternal client. I did the traditional ASMX based w...

Web service URL being overwritten with localhost

I have a reference to a web service on a remote server like such... http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl The moment I invoke the web service and view its URL property it looks like... http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx Can anyone tell me why it's overwri...