asmx

How to force ASMX web service to send JSON data to client on HTTP GET request?

I'm trying to use the official jQuery autocomplete plugin with an ASMX web service in an ASP.NET 3.5 Web Forms application. If I understand it correctly, the autocomplete plugin can only use HTTP GET to call a service (with two query string parameters: q and limit). I figured out how to make the web service respond to the HTTP GET calls,...

How do I hide the username/password prompt that appears when a [WebMethod] gets called on an invalid session?

I have a .aspx with a static method decorated with the [WebMethod] attribute and a ScriptManager on the page, so that the WebMethod can be called with PageMethods.MethodName(). Forms authentication is enabled. This works well in all scenarios except where the WebMethod is invoked on an expired session. When that happens, the service re...

How do I use a common class between winforms client and web service?

I have inherited a large admin winforms application that shares a 'Common' library of classes for holding data with a web service. The problem I am having is that if I return a populated instance of a class from a web service call then it comes out on the client as a different type and I cannot use the other 'Common' project logic to man...

VS2003 Web Reference for a WCF Service has Extra "IdSpecified" Parameter

I am developing a WCF service using VSTS 2008 + .Net 3.5 + C# and it works fine when I also use VSTS 2008 to develop client (using Add Service Reference function to automatically generated client web services proxy code). The WCF I developed is using basicHttpBinding. The issue I met with is, when I use Visual Studio.Net (Visual Studio ...

ASP.NET Web Service Security

I've built ASP.NET Web Services in the past that either were publicly consumed, or used Windows Authentication. I now need to build a Web Service that uses the SOAP 1.1 protocol and it needs to be secured with a username and password from the caller. It seems setting up the infrastructure for WCP is overkill for one or two Web Services...

.NET ASMX web service to use WSDL file on disk instead of auto gen?

I've got a WSDL file created in Altova XMLSpy, that is then used in Altova Mapforce to map out a service. This is then used to create a .NET service (asmx). The problem is the way Altova Mapforce generates the service webmethod. Instead of the interface created in the WSDL you get a generic webmethod that takes a parameter of type arr...

How to control output format in ASP.Net web service

We're switching from a legacy app written in ColdFusion to an ASP.Net Web Forms application. One requirement is to move over the legacy web service. The address can change, but the format of the input and responses have to be the same. I'm relatively new to web services, but I know that there are both SOAP and JSON output formats for a ....

Web service in visual studio 2005

Can we create webservice in visual studio 2005 . ...

Get a DataSet returned from SOAP as XML?

We have a .NET 2 SOAP web service meant for consumption by another app that is internal to our organisation. The web service returns a .NET dataset like so: public System.Data.DataSet GetStatementFor(string contractList, System.DateTime startDate, System.DateTime endDate) Now in one of the use cases it is necessary to get to the Dat...

II7 Allow asmx files to be downloaded

Hi there, I'm using II7 and bits down loader to deploy my application to customers. Can someone please tell me how to allow asmx files to be downloaded and not executed on IIS 7. I tried to do this with the MIME type, but no luck. Regards ...

How to call an ASMX web service via GET?

I have a webservice defined here: /app/AutocompleteManager.asmx [WebMethod] public string AutocompleteComposers() { return "hey, what's up"; } I want to call it using the GET method with extra parameters. If I just go /app/AutocompleteManager.asmx?q=something, it won't work because I don't have the action specified. If I go /app...

Session State not Retained over calls to a Page Method

My server side code: [WebMethod(CacheDuration = 0, EnableSession = true)] public static int UserID() { if (HttpContext.Current.Session["UserID"] == null) return 0; int UserID = Convert.ToInt32(HttpContext.Current.Session["UserID"]); return (UserID); } My Client side code: $.ajax({ type: "P...

Switching Among Instances of a Web Service (ASMX)

I have the same ASP.NET WebService deployed 3 times under 3 different URI's configured to look at 3 different databases environments. I have a Class Library that uses the WebService using a Web Reference. Every time I want to compile the Class Library to a different environment I have to change the Web Reference by hand to the appropri...

Can I develop ASMX web services in Visual Studio 2008 Standard Edition?

I need to know if I can develop ASMX web services using VS 2008 Standard Edition, or if I need Professional Edition? I can't find this anywhere. Thanks. ...

Mono c# web services

I have web services that work great when hosted normally, in Mono I am getting a 500 internal server error first time I tried to run it. Any idea why it doesn't just work? The remote server returned an error: (500) Internal Server Error. System.Web.Services.Protocols.SoapException: Error writing request. at MY_WebServices.My_Message...

How to resolve reference to applicationSettings when web.config not available

I am trying to take the code in an .ASMX web service and change it into a class library project. The web service project has a web.config file with: <applicationSettings> <myService.Properties.Settings> <setting name="DownloadChunkSize" serializeAs="String"> <value>100000</value> </setting> ..and the co...

Sending pound signs from Delphi to C# web service

I am sending a large string from Delphi 5 to a C# web service, and I'm having lots of trouble with Pound (£) signs. I URLEncode the string from the Delphi side (which seems to convert them to '%A3'). When it reaches the C# web services it appears as '�'. I have tried changing the encoding of the string on the C# side by using a StreamRea...

asmx WebMethod caching on POST request in asp.net

I am using jQuery to get back some JSON data from the server. I am using a POST verb, but even after setting the WebMethod CacheDuration attribute, the JSON doesn't get cached. I checked the response headers with firebug and the Cache-Control is still set to no-cache. How can i cache these request on the client and avoid the server to b...

Throwing a XML Web Service Exception for invalid username / password

I've created a web service and am using a Soap header for authentication, as described here: http://aspalliance.com/805 I've adapted it, so that in every method, it calls a seperate "authenticate" method, which searches username and password in the db, and returns true or false. My question is, within this method, if it returns false (i...

What is the most efficient/secure way to authenticate a web service in ASP.NET?

Background:** We have an ASP.NET web app which exposes simple ASMX web services such as: string GetOrders(string userName,string password,DateTime orderDate) : Return an XML string of customer orders based on the user (customer). void UpdateOrders(string userName, string password, Guid orderGuid, string orderXml) : Update an order's da...