asmx

web service could not create type error with type in the GAC

夙愿已清 提交于 2019-12-08 02:22:15
问题 Stuck with an unusual problem, would seem that I love doing things that's not very common. I have a composite control, that checks to see if a given web service file exists in the root of my application, if it does not, it creates the file with the necessary directive in the markup to ball rolling, something like: <%@ WebService Language="C#" Class="Company.Project.Assembly.ClassName" %> which in turn, gets saved to the output. Once this step has been completed, a recycle on application pool

How to turn off persistent connections for web service calls

左心房为你撑大大i 提交于 2019-12-08 02:09:59
问题 From my WinForms application I have to call a webservice and I am using a web reference for that. No problems so far, but now I have a client that uses the software behind a proxy that is behind a load balancer. Webservice calls are going fine, but after two minutes they fail. We can work around this by repeatedly calling a webservice with an interval less than two minutes. I turns out that the load balancer disconnects tcp sessions when they are not used for two minutes, appearantly this is

Using backbone.js to get data from ASMX with the 'd'

丶灬走出姿态 提交于 2019-12-08 01:32:46
问题 I'm pretty new to Backbone and I've been trying to create autocomplete functionality with it, fed by an ASMX webservice. The issue I seem to have is whilst my webservice returns in JSON (after a painful battle with it), it wraps the response in a 'd' (dataset). How do I get the view to understand this and get at the correct data? Here is my code:- var Airline = Backbone.Model.extend({ initialize: function () {}, defaults: { name: 'Airline Name', rating: 50, icon: '/blank.png' } }); var

Consume WCF service using add web reference and add a soap header

你说的曾经没有我的故事 提交于 2019-12-07 19:32:50
问题 I have a WCF 4 web service that checks for a soap header. This works fine with a WCF client but I have a customer that needs to use the old web reference from their app. How do you consume a WCF service using Add Web Reference and the add a SOAP header in the client? Lets keep it simple and say I want to pass a country in a header, so the header name will be country. Thanks, Paul 回答1: You need to expose your endpoint across the basicHttpBinding in order to interoperate with pre .net 3.0

WCF Configuring server to remember data

我的梦境 提交于 2019-12-07 14:48:25
问题 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

Forcing ASMX proxy to use XmlSerializer instead of DataContractSerializer

一世执手 提交于 2019-12-07 12:46:17
问题 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

How to Enforce HTTPS For ASMX Service

社会主义新天地 提交于 2019-12-07 11:43:42
问题 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

403 Forbidden Error

天涯浪子 提交于 2019-12-07 06:11:01
问题 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;

Send SOAP Request from a specific IP address

[亡魂溺海] 提交于 2019-12-07 05:39:43
问题 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. 回答1: 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

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

我的梦境 提交于 2019-12-07 04:54:53
问题 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