asmx

ASMX: Setting User/Password at run-time

∥☆過路亽.° 提交于 2019-12-12 03:51:46
问题 When I want to connect to my web service If I write it like this: m_TransferServiceSoap.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; it is working. but I need a Login Form. so users can enter their user/pass so I am creating a NetworkCredential instance and setting its user/pass members from what I get from that login form and then instead of using the line above I am writing this one: m_TransferServiceSoap.Credentials = userpass; // the instance above. but in this way

Jquery AJAX to asmx web method get error as response

女生的网名这么多〃 提交于 2019-12-12 02:57:00
问题 OK, so this is what I do: client: function AjaxCall(url, method, data, OnSuccessFunction, OnErrorFunction) { var ajaxData = data; ajaxData = JSON.stringify(ajaxData); var ajaxURL = url + "/" + method; $.ajax({ type: "POST", url: ajaxURL, data: ajaxData, contentType: "application/json; charset=utf-8", dataType: "json", success: function () { OnSuccessFunction.apply(this, arguments); }, error: function () { $('.ProgressBar').hide(); OnErrorFunction.apply(this, arguments); } }); } $(document)

Calling a Method with a SoapExtensionAttribute

笑着哭i 提交于 2019-12-12 02:56:54
问题 I have problem, I want set soap extension attribute in web method: Soap extension in web service: public class EncryptMessageAttribute : SoapExtensionAttribute { private string strKey="null"; public void setKey(string s) { strKey=s; } } Soap extension class: public class EncryptMessage : SoapExtension { .... } Soap extension on web method: public class Service1 : System.Web.Services.WebService { public string k; [WebMethod] [EncryptMessageAttribute(setKey(k))] public string test2() { return

Is ASMX WebService or WCF or aspx pages are async by default?

有些话、适合烂在心里 提交于 2019-12-12 01:54:08
问题 I involved my self within a bet, our feud is about - Async WebServices and the other stuff i mentioned above. I am thinking logically web service by default is sync, the other said that it is not correct. Who is right or wrong can any one explain it to me? Thanks in advance. 回答1: All of them are by default synchronous but you can write all of them asynchronously and you can call all of them asynchronously. You should always differ between synchronous/asynchronous call and between synchronous

how to run asmx webservice on ubuntu/linux?

假如想象 提交于 2019-12-12 01:32:39
问题 i have a running webserver with ubuntu. (on ec2 instance) i also have an asmx webservice i created with c#. i want use this setup to connect between the webserver and couchbase. (but its not very important for the question itself) is it possible (im guessing yes) to load that asmx(lets call it a file) to run on ubuntu? what are the best tools/frameworks to deploy asmx webservice on ubuntu? is there a reason why i should not do that, and deploy it on a windows based server instead? (like

Web Reference works, but A Service Reference complains about Soap version

风格不统一 提交于 2019-12-12 00:08:37
问题 I have to connect to a legacy web service. In visual studio, if I do a Add Service Reference, then enter the url of the WSDL file on server. My service shows up, and I write the code against it. But when I run the code I get this error: System.ServiceModel.CommunicationException: The envelope version of the incoming message (Soap12 (http://www.w3.org/2003/05/soap-envelope)) does not match that of the encoder (Soap11 (http://schemas.xmlsoap.org/soap/envelope/)). Make sure the binding is

Secure access to an ASMX Service from a Cordova (PhoneGap) Application

大兔子大兔子 提交于 2019-12-11 20:49:54
问题 I have built my app using PhoneGap and everything is working fine. My question is regarding security of this access. In this app, the user needs to login providing username and password (which I keep in localStorage ). After logged in, the app calls a lot of WebService methods and there is no security (I can get data even from URL in the browser passing the correct params). The existing security (almost none) is good enough to regular users, but it is not difficult to verify HTML and discover

Using Jquery to call an ASMX service in sharepoint 2010

ⅰ亾dé卋堺 提交于 2019-12-11 17:15:31
问题 The service I'm trying to call is deployed as part of a visual web part. If i call it directly: _layouts/service.asmx I get the expected service page, showing me the functions I want to call. When I do the Jquery Ajax call (it works just fine on my development server) I get a 500 error back from the server. $.ajax({ url: 'http://myserver/_layouts/service.asmx/GetLinksToAllFav', data: "{'tag': '" + $('#MyTag').val() + "', 'TagMaxLength': '" + $('#TagMaxLength').val() + "'}", type: 'POST',

Authentication Fails using ksoap2 Android

六月ゝ 毕业季﹏ 提交于 2019-12-11 17:04:54
问题 Hi I am using ksoap2 for data parsing in Android. I am not able to understand exact issue with my code. I need to parse data in ksoap2. can any one help me to solve this issue. whenever I tried to parse, in my response it is giving 'Authentication Fail', I have already checked that , in my header I am passing username and password properly. Following is my code please let me know any solution This is the format for soap api. POST /Wt/webtask.asmx HTTP/1.1 Host: www.myweb.co.ke Content-Type:

Dynamically load .asmx web-service

邮差的信 提交于 2019-12-11 15:26:28
问题 I have an .aspx page that can perform a number of functions. The type of function is determined at run-time depending on which button the user clicks. This makes makes a web-service call to an .asmx method. The web-service call returns html and javascript which then become part of the original page. This new content has javascript events attached to button clicks, data validation etc. In turn these events then call their own web-service methods in another .asmx file. The main page does not