asmx

Legacy ASMX webservice - How to use automagically generated async method

巧了我就是萌 提交于 2019-12-13 01:36:20
问题 In a asmx webservice i use with c# class library project after adding the web reference to the project which exposes the WebMethods inside the service there are multiple method names for example, In my service i have a webmethod named GetCategories but the intellisense also shows GetCategoriesAsync Is this a asynchronous call to the same webmethod? If so how can i invoke this asynchronous method any examples ? 回答1: You can call the method the same as you call the regular method, you should

Failed to load asmx file?

拈花ヽ惹草 提交于 2019-12-13 01:08:02
问题 I am using the gleamtech filevistacontrol for a back-end of a website. When i load the page which contains the control i get an error that a language file could not be found. I get an 404 response when calling the webservice. The application is running on a windows server 2008. On my development machine the application is running without problems. I got the filevista control running in another application but this is running on a windows server 2003 machine. Things i have tried: 1. Verified

Getting file from .ashx with a jQuery Post

血红的双手。 提交于 2019-12-12 20:46:51
问题 This question is a following from another question I asked - Passing client data to server to create Excel or CSV File. I have a client page which builds a JSON object to send to the server, and I have server code which can parse that JSON object into an SQL command and end up with a dataset of required data. I had originally been passing the JSON object to an .asmx web service which would return a JSON object containing my data. Now I want to go in a different direction and have the data

Expose additional classes in ASP.NET 2.0 webservice

那年仲夏 提交于 2019-12-12 19:08:08
问题 Consider a webmethod which exposes an abstract class: [WebMethod] public void Save(AbstractEntity obj) { // .. } There are several classes inheriting from AbstractEntity like public class Patient : AbstractEntity { // ... } Now I want to enable the webservice consumer to create a new Patient object and save it: service.Save(new Patient { Name = "Doe", Number = "1234567" }); Because "Save" takes an AbstractEntity, there will be no Patient proxy on the client side. I could of course create a

Testing custom SOAP Headers in ASMX

风流意气都作罢 提交于 2019-12-12 18:43:16
问题 The test form generated by ASMX is pretty handy for testing operations. However, there is no apparent way to include SOAP headers. How can you test your headers without programming a client to use the service? 回答1: If you care about interop, don't use .net client apps to test .net web services. Use a proper tool like SOAPUI to test your web service. www.soapui.org The tool is written in Java, but it is free and darn handy for testing any kind of web service. 回答2: If I understand what you are

How to add WebMethod in an asmx file

心已入冬 提交于 2019-12-12 17:51:52
问题 I have started working in ASPX web project, which has already an existing asmx file. It contains around 4 WebMethods and these 4 Webmethods are showing the http://localhost:2133/WebServices.asmx Now I tried adding new WebMethod named GetCities very similar to the existing one, but it is not showing the list in http://localhost:2133/WebServices.asmx . I tried recompiling it. When I checked deeply (service reference)I couldn't find where the WebService WebServices.asmx is being referenced.

ASMX Web Service Expose Class

岁酱吖の 提交于 2019-12-12 16:13:17
问题 I'm creating a basic web service in asp.net/c# using simple ASMX services. When I create a method that returns a class, this class definition is discoverable by clients of the service. I'm wondering if there is a way to expose a class to the service that isn't used directly in any of the service methods. I need my service clients to know about a particular class even though it doesn't appear as a return value or parameter type in any of the methods. I realise this is a strange requirement,

Large binary over asmx web service

强颜欢笑 提交于 2019-12-12 14:22:27
问题 I am transfering a large zipped text file over the classic asmx web service. My reason for doing so is that the file's size is 20 MB unzipped, 4MB zipped. This is the method. I will provide additional information if necessary. [WebMethod] public byte[] Transfer() { return File.ReadAllBytes(@"4MBFile.zip"); } I am using C# and .NET 4. (I changed the initial settings for the project from 2.0 to 4.0). A webmethod uses a kind of serialization so I guess there will be some overhead. Am i really

How to Pass Name/Value Pairs to an ASMX Web Method?

会有一股神秘感。 提交于 2019-12-12 14:11:20
问题 I am creating a webservice that essentially remotes some database calls (so that they happen over HTTP rather than the default SQL Server port of 1433). Essentially what I have been trying to do is pass a number of parameters to a WebMethod on an ASMX WebService. The parameters are: A string representing the ID of the query to be execute. A DataTable representing the structure of the table that the information should be filled into. A dictionary of parameters (i.e. name value pairs) to be run

Calling a WebMethod from a web reference with optional parameters in C#

孤人 提交于 2019-12-12 13:32:02
问题 I have created a dummy web service with 2 optional parameters using the .Net Webservices, however in the real product we are going to have a lot more optional parameters(think: filters for a query). The problem is that it is not possible to leave out the optional parameters when calling the webservice, meaning there will be a potential dozens of NULL values in every call to the webservice when developing against the real webservice. Right now this dummy webservice consists of only this, to