asmx

Pitfalls of calling static method from ASMX

Hello, I would like to know if there are any pitfalls on calling a static method from an ASP.NET web service. internal static object SelectScalar(String commandText, DataBaseEnum dataBase) { SqlConnection sqlc = new SqlConnection(AuthDbConnection.GetDatabaseConnectionString()); object returnval=null; if ...

ASMX not generating WSDL when using Custom IHttpHandlerFactory

I am implementing a dynamic ASMX web service via a custom HttpHandler, and my web service has recently stopped generating WSDL automatically. When I use ?WSDL on the asmx url, I get the following error: System.InvalidOperationException: XML Web service description was not found. at System.Web.Services.Protocols.DiscoveryServerProtoc...

Code First .NET Web Service uses soap encoding - how can this be prevented?

How would one configure asp.net / asmx to not use soap encoding at all when generating wsdls from a .NET interface? In short, a .NET SOAP Web Service is producing a wsdl that includes soap encoding. For example: <s:schema targetNamespace="http://tempuri.org/AbstractTypes"&gt; <s:import namespace="http://schemas.xmlsoap.org/soap/enco...

Install MSI using ASMX web service

I have been trying to create a asmx web service which can download & install a msi. When the web service attempts to install MSI, the MSI throws the following error - MSI (c) (60:D8) [13:02:57:859]: Client-side and UI is none or basic: Running entire install on the server. MSI (c) (60:D8) [13:02:57:859]: Grabbed execution mutex. MSI (c)...

Asp.Net Server-side implementation options for Ajax site

I'm very new to the whole Ajax/Asp.Net stuff so... I know that there are at least a few different ways of implementing the server-side of an Ajax enabled Asp.Net site. One way is to add static methods to your aspx page's code-behind and mark them with the WebMethod attribute. Another way is to use a separate ASMX web service fil...

ASMX in Delphi Studio

Hi guys, I recently bought Bob's book Delphi XML, SOAP & Web Services in page 85 of this book the (Delphi 2006 8used) comes with several New Item Categories such as C# Projects C++ Builder projects Delphi for .NET Projects something that you don't have in a fresh installation I need this ASP.NET Web Service Application that is ins...

Call non-static method in server side(aspx.cs) from client side use javascript (aspx).....

how Call non-static method in server side(aspx.cs) from client side using javascript (aspx)....? As far as I know I can call static method in server side from client side... server side : [System.Web.Services.WebMethod] public static void method1() { } client side : <script language="JavaScript"> function keyUP() {...

How do I include my own wsdl in my Webservice in C#

I have a .wsdl file that my web service (old asmx style) must implement. That is taken care of. When I publish the web service you can call it with ?wsdl parameter to get a generated wsdl. How do I include my .wsdl file so that is the one that is returned instead of the generated one? Is it possible to do with an attribute in my web se...

Slow web service (and WCF service) calls from Windows 7

Hello, I am building a .NET 3.5 Winforms app that uses WCF services (wsHttp binding) to communicate to my server which gets data from SQL Server and passes it back to the Winforms app (Smart Client). I noticed since running Windows 7 RTM there is about a 30 second delay the first time the WCF communicates, from that point forward it's ...

Dynamically load .asmx web-service

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 ev...

Having problem with nullable values using wcf webservice in Visual Studio 2003

I have Written a webservice with VS2008 after I had Added Reference to that service in VS2003,I encountered a problem calling methods which return nullable values such as int? if I fill that feild with a value,the problem solves. Is There any other way to solve this problem? Some more Information Please Look at these extract from my ow...

how to generate web service out of wsdl

I know this must be answered a lot of times but I didn't get the answer what I'm looking for. So the client provided me the wsdl to generate the web service.But when I used the wsdl.exe command it generated the .cs class out of it. I consumed that class in my web service and when I provided the wsdl to client it didn't match their schema...

Can I control the XML element names for an array and its items as the return value from an asynchronous .Net ASMX web method?

Consider the following .Net ASMX web service with two web methods. using System; using System.Runtime.Remoting.Messaging; using System.Web.Services; using System.Xml.Serialization; namespace DemoWebService { public class ArrayItem { public int Value1; public int Value2; }; [WebService(Namespace = "http://begen.name/xml/n...

Calling a Method with a SoapExtensionAttribute

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 { .......

ASMX Web Service Soap Extension - How to Inject Attribute into Client Proxy Class?

I try set soap extension attributes on client side. For example: Implementation in web service: [AttributeUsage(AttributeTargets.Method)] public class EncryptMessageAttribute : SoapExtensionAttribute { private string strKey="null"; public string StrKey { get { return strKey; } set { strKey = value; } ...

Is there a way to restrict access to an ASMX Webservice, i.e. the asmx page and its WSDL?

I have a C# .net webservice that I need to restrict access to. I already require my consumers to use a username and password to call the service. But, is there a way to restrict access to the actual asmx page and the WSDL? I would need to restrict access to the webservice by username/password and IP address. If a user did not have th...

Forcing ASP.net webservice to return JSON

I have an ASP.net web service that I'm using for a web application which returns a either XML or JSON data to me, depending on the function I call. This has been working well thus far, but I've run into a problem. I want to create an "export" link on my page that will download a JSON file. The link is formatted very simply: <a href="myw...

Optimizing an ASMX web service with Multiple Long-Running Operations

I'm writing an ASP.NET web service using C# that has a DoLookup() function. For each call to the DoLookup() function I need my code to execute two separate queries: one to another web service at a remote site and one to a local database. Both queries have to complete before I can compile the results and return them as the response to t...

Create an instance of an ASMX stub object from a real object

I have an ASMX web service that exposes several objects. I have a real instance of that object, and I would like to instantiate a stub object that is populated from it. Clearly there is such functionality already, because when the web service returns a value it is creating the stub and populating it. I just need to do the same thing man...

ASMX Object -> Proxy Object Conversion

Is there a way to convert an instance of an object to an instance of a web service proxy of the same type? It seems like this is something .NET has to be capable of under the hood, so I'm just trying to find and re-use this function. It's definitely a little awkward, but I have access to both types in my project through a common librar...