asmx

WCF Configuring server to remember data

这一生的挚爱 提交于 2019-12-06 01:15:44
I currently have a service in WCF where it processes requests made by a client. However, it caches some data that the client sends it. It then does computations on the data. At any point the client should be able to retrieve some of the data. It is at the discretion of the user (when a Button is clicked, an AJAX query is sent to get some of the data). The problem I'm having is that as soon as another client connects, and starts sending requests, the data that the original client sent is now distorted. I was wondering how I can resolve this. I've attempted to use sessions, as I was looking for

Forcing ASMX proxy to use XmlSerializer instead of DataContractSerializer

∥☆過路亽.° 提交于 2019-12-05 21:01:13
We were given external SOAP services that we have to consume in our project. All of these provide WSDL data, but a lot of them are not .NET services (most of them were written in Java). We have generated a number of client proxies with wsdl.exe tool. This tool does what it's supposed to do, it creates proxies for us to consume. The problem appears once we try to call methods on these services using generated proxies. We intercept all SOAP requests for logging purposes and XML data looks different from the one specified in WSDL schema. For instance, if a field is called "Name", our proxies will

how do you pass parameters in asmx using Flexigrid?

最后都变了- 提交于 2019-12-05 20:24:30
here's my code: $('#flex1').flexigrid({ method: 'POST', url: '/services/MHService.asmx/GetSurgicalHistory', dataType: 'xml', colModel: [ { display: 'Surgical Procedure', name: 'SurgicalProcedure', width: 120, sortable: true, align: 'left' }, { display: 'Notes', name: 'Notes', width: 120, sortable: true, align: 'left' }, { display: 'Complications', name: 'Complications', width: 120, sortable: true, align: 'left' } ], searchitems: [ { display: 'Surgical Procedure', name: 'SurgicalProcedure' }, { display: 'Notes', name: 'Notes' }, { display: 'Complications', name: 'Complications' } ], sortname:

How to Enforce HTTPS For ASMX Service

╄→гoц情女王★ 提交于 2019-12-05 13:49:44
I have a number of existing ASMX web services running on IIS7, and want to change them so that all requests and responses must be made over HTTPS. The site is also running other pages like PHP and Classic ASP, so I can't just change the site root to serve HTTPS pages. How can I set this per ASMX serivce (application), so that if somebody visits http://www.mydomain.com/MyService/ServiceName.asmx it either redirects them to https://www.mydomain.com/MyService/ServiceName.asmx or returns a 404 error ? Thoughts and best approach ? Have you tried with URL rewrite? <rewrite> <rules> <rule name="Force

500 Error - JSON object POST to .ASMX webservice

一世执手 提交于 2019-12-05 13:48:54
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, DeliveryCharge: 0, CreatedBy: $('span[id$="lblHidUsername"]').text(), ApprovedBy: $('span[id$=

Getting “This method or property cannot be called on Null values” error

五迷三道 提交于 2019-12-05 11:49:41
UPDATE 1: The exception is being thrown on this line: client_group_details.Add(new ClientGroupDetails( ORIGINAL QUESTION: I have the following code which I have stripped down from 30 columns of data from the database to just 2 columns from the database. I get an error whenever any of the columns return a NULL value: public class ClientGroupDetails { public String Col2; public String Col3; public ClientGroupDetails(String m_Col2, String m_Col3) { Col2 = m_Col2; Col3 = m_Col3; } public ClientGroupDetails() { } } [WebMethod()] public List<ClientGroupDetails> GetClientGroupDetails(string phrase) {

Getting Exception Details from ASP.NET PageMethods on the Client SIde

穿精又带淫゛_ 提交于 2019-12-05 11:06:41
I am having a pagemethod to which i give a call from my JavaScript say Pagemethods.MyMethod(MyParameter, onsucess, onfailure); In the Code behind, I have something like this: [WebMethod] public static void MyMethod(Param) { try{ //DoSomething.. } catch(exception ex) { //Log the exception and rethrow throw new exception(ex.innerexception); } } Now the issue i face is : Whenever i do get an exception, i re throw the exception from code behind But in the onfailure method, i just get a generic message saying that "the server method MyMethod failed with following error: " I don't seem to get the

Send SOAP Request from a specific IP address

泄露秘密 提交于 2019-12-05 10:47:48
I have a system with multiple IP address. But I'm allowed to initiate SOAP Request only from one IP address. How do I obtain that in VB.NET. I've never done this. It looks complicated. First, read Ways to Customize your ASMX Client Proxy to learn the basic technique of overriding the GetWebRequest object of your proxy class. You will need to override GetWebRequest so that you can grab the ServicePoint being used to make the request. You will set the BindIPEndPoint property to a delegate pointing to a method of yours which will return the correct IP Address. public partial class Service1 {

403 Forbidden Error

。_饼干妹妹 提交于 2019-12-05 10:42:06
When I'm accessing web service from jquery, I'm getting the 403 forbidden error.. I published and created in the virtual directory too. Wat's the cause of this error and how to rectify it? I've added the webservice in the same solution.. This is my following code.. $(document).ready(function() { $("#sayHelloButton").click(function(event){ $.ajax({ type: "POST", url: "App_Code/DummyWebService.asmx/HelloToYou", data: "{'name': '" + $('#name').val() + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { AjaxSucceeded(msg); }, error: AjaxFailed }); }); }

ASMX Returning a pure string

我怕爱的太早我们不能终老 提交于 2019-12-05 09:43:44
I have an ASP.NET web service (.asmx). My service is defined like the following: [System.Web.Services.WebService(Namespace = "http://tempuri.org/")] [System.Web.Services.WebServiceBinding(ConformsTo = System.Web.Services.WsiProfiles.BasicProfile1_1)] public class MyService : System.Web.Services.WebService { [System.Web.Services.WebMethod] public string GetResult() { string result = ""; int day = System.DateTime.UtcNow.Day; if ((day % 1) == 1) result = "odd"; else result = "even"; return result; } } Currently, if I call this service method, I get the following result: <?xml version="1.0"