asmx

Throwing a SoapException does not return a valid SOAP response

北战南征 提交于 2019-12-10 15:17:00
问题 I'm working on an old web site. It is calling an ASP.Net web service (old .asmx files). Whenever an exception happens in the web service, it will throw a SoapException. The client catches this exception but is not able to pars it. I'm viewing the SOAP request and response using both Fiddler and SOAP UI and reading this article http://msdn.microsoft.com/en-us/library/aa480514.aspx I expect to get the response in the following format: <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring

ASMX web service reference how to set equivalent to MaxReceivedMessageSize

吃可爱长大的小学妹 提交于 2019-12-10 14:08:13
问题 Web Service is an ASMX web service (NOT WCF) I am receiving an error The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element I am using a proxy that Visual Studio generates for you when you add a "Web Reference" (please note that I am NOT adding "Service Reference", instead I am using Web Reference)... this creates a proxy that inherits from SoapHttpClientProtocol Can

PhoneGap File Transfer Error (code: 3, http_status: 404) on iPhone

五迷三道 提交于 2019-12-10 12:00:49
问题 I am trying to create an iOS app using PhoneGap that will allow a user to upload photos to a web server. Here is my code. <!DOCTYPE html> <html> <head> <title>Capture Photo</title> <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for PhoneGap to load document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap is ready function onDeviceReady() { // Do cool things here... } function getImage()

Cancel a long task that's managed by a web service

人走茶凉 提交于 2019-12-10 11:58:12
问题 I have a web service with three methods: StartReport(...) , IsReportFinished(...) and GetReport(...) , each with various parameters. I also have a client application (Silverlight) which will first call StartReport to trigger the generation of the report, then it will poll the server with IsReportFinished to see if it's done and once done, it calls GetReport to get the report. Very simple... StartReport is simple. It first generates an unique ID, then it will use System.Threading.Tasks.Task

calling asmx web service method with jquery ajax

笑着哭i 提交于 2019-12-10 11:53:42
问题 I have hosted web application with simple asmx web service in IIS 7.5 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace TestWebService { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class Test : System.Web.Services.WebService { [WebMethod] public static string

How do I get the parameter values from in a web service

眉间皱痕 提交于 2019-12-10 11:18:20
问题 I have a web service (an ASP.NET .asmx page), and for debugging purposes I need to log all calls to the webservice, including values of all parameters passed into each call. So basically the first thing each WebMethod should do is log it's state with details of all the parameter values passed in to it. So far so good. The complication is that I also want an automated way of getting the parameter values - there's quite a few webmethods with different signatures, and some of them have up to ~30

ASP.NET web service erroneously returns XML instead of JSON

萝らか妹 提交于 2019-12-10 10:16:49
问题 I'm attempting to use an ASMX web service from javascript using jQuery. It works fine when I ask for XML, but I want to make use of .net's JSON serialization functionality; (it's also starting to bug me that this isn't working) The code for the web service: using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Script.Services; [WebService()] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService] public class

How to download file using JavaScript only

南楼画角 提交于 2019-12-10 10:05:42
问题 I have only JavaScript page and .asmx page.I want to download file using only JavaScript how can I download the file please give some solution. I am beginner in JavaScript. I want to download particular resume. http://i.stack.imgur.com/HW921.jpg I am getting resume here, var res = data[i].resume; I want to download resume please help me. 回答1: You may use different third-party libraries: jQuery.fileDownload It takes URL as an input and downloads a file while shows a loading dialog. Github:

500 Error - JSON object POST to .ASMX webservice

五迷三道 提交于 2019-12-10 09:28:51
问题 Keep the question here short and sweet. I'm Getting a 500 error when I try and pass a JSON object to an ASMX webservice. Note that if I declare the params as individual variables (eg. int ID, int OrderHeaderID , etc) I do not receive the error . I can't see why the problem is happening, I have successfully passed objects in this manner before, possibly with different syntax but I can't recall. JS: var returnHeader = { ID: -1, OrderHeaderID: parseInt(getQueryStringKey('OrderID')), StatusID: 1,

What's the ASP.NET Webservice request lifecycle?

蹲街弑〆低调 提交于 2019-12-09 15:25:19
问题 On a regular aspx page, I have events such as Page_Init , Page_Unload , etc., which occur in a well-defined order. I have an asmx page providing [WebMethod()] s. Do similar events exist? In particular, some events that allow me to initialize some data (like Page_Load ) and do some clean-up (like Page_Unload ) would be extremely useful. (As far as I can tell, the constructor of the asmx code-behind class seems to be called on every WebMethod request, i.e., a new instance is created for every