asmx

InvalidCastException from windows phone 7 talking to a .asmx web service

I have a .NET 2.0 .asmx web service that looks something like this: [WebMethod] [return: XmlArray("FileInformations"), XmlArrayItem("FileInformation")] public FileInformation[] GetFileInformation( [XmlElement("Path")] string path) When I try to call this web service from a silverlight windows phone 7 app (beta). I get an Inva...

Changing the namespace in ASP.NET .ASMX webservices?

I'm trying to call an ASP.NET .asmx webservice, from javascript, using other than the default namespace that Visual Studio uses when it creates it. When I use the Visual Studio wizard to create a webservice named Hello, in the folder WebServices, it creates this: namespace MyWebSite.WebServices { [WebService(Namespace = "http://tem...

How to retain sessions across calls to an ASP.Net web service from a Soap client

Here is how my system is set up: A web service using ASP.Net web service The web service has a web method with EnableSession=true A client which refers to the web service using "Service References" (note: not "Web References") The app.config of the client has allowCookies=true On the client side, I have the following code to upload a...

Create web service based on it's clients

Hi, I have the task of creating a web service that would be used by some clients. We didn't get the xsd's or anything. There are layers and layers of communication between me and the client, and it's just too complicated to get the problem through (and it probably wouldn't resolve anything for about a month, while we do have a schedule...

consuming wcf in .net 2.0 winform

How can we consume WCF service in .Net 2.0 Winform. Please note that we don't have IIS on the client. an example or a sample would be great. ...

multiple output parameters in .NET web service (without complex type)

Is it possible to create an C# web service which returns multiple strings, without generating a complex type? (Because my client can't handle complex types and I need to return exactly 2 strings with the names: "wwretval" and "wwrettext") I've already tried to create a struct or a class or do it with out params, but it always generated...

Consume ASMX Webservice From Classic ASP Using SOAP Client 3.0

Hi, I made a webservice in VB.Net with a method returning a custom class or object. <WebMethod()> _ Public Function CreatePerson(ByVal LastName As String, ByVal FirstName As String) As Person Return New Person(LastName, FirstName) End Function Public Class Person Public Sub New() End Sub Public Sub New(ByVal LastNam...

How to serialize a custom exception to json in c#

I have a c# web service that I call using jquery ajax. It works fine except when a custom exception is throw inside the web method. For some reason, the XmlHttpResponse objects responseText only has the base Exception class's properties. So I end up with a json object with the following properties: "ExceptionType", "Message", and "Sta...

Accessing the registry from a web service

I've been having difficulties accessing some (but not all) registry keys from my web service. I therefore assumed (and confirmed with some research) that there are some security restrictions on accessing the registry. Is there some code or change in the configuration I need to do specifically in my C#.Net application? Specifically, I ...

Passing ArrayList from VB.Net to C# WebServices

I've got the unenviable task of cleaning up a rather messy VB.Net client. The general plan is to move all calculations to WebServices, and I can see exactly how to do this, but it involves passing a large number of different variables to the WebServices. I chose to use an ArrayList as I've worked with them heavily in Java, and have had ...

Calling an ASP.NET asmx Soap webservice with raw GET: problem with double type

I have an asmx webservice that I need to pass a value of 0.05. I want to test Firefox addon Poster https://addons.mozilla.org/en-US/firefox/addon/2691/ with it, everything fine except type conversion as Server response is: Cannot convert 0.05,0.05 to System.Double. Parameter name: type ---> Input string was not in a correct format. Wh...

What is the best way to develop an asp.net Webservice which will have methods that return list, individual objects or other complex datatypes

We are using .Net 2.0 to create webservices. We would like to design webservices in ASP.Net 2.0. Currently the webservices we have return either a single parameter like <s:element name="ChangePassword"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="userName" type="s:string" /> <s:...

Web Service proxy class to implement interface

I am looking for a way to have the generated proxy class for a Web Reference (not WCF) implement a common interface in order to easily switch between web service access and "direct" access to our business layer in the client application, something like: public IBusiness GetBusinessObject() { if (_mode = "remote") return new Busine...

Silverlight: connecting to secured ASMX service

I need to connect to an ASMX secured web service over HTTPS using Silverlight 4. I have been able to connect to the service using a WPF application using the following configuration: <binding name="wsSomeWebService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies...

How to programmatically retrieve all of a web service's web methods' signatures?

I'm trying to build a c# application that displays and invokes all of a specific web service's methods (the web service is written as a .asmx file). I can go directly to the asmx file and get the methods names from the returned html, but I'm sure there is more elegant way to do it (this way doesn't reveals the web methods' signatures as ...

ASP.net iFrame wanna-be

I have been tasked with a project where I am to add a new application and have it within an older application (web applications). This is an internal application and management decided that they want it wrapped in this older app. The older application is a ASP.net web app using the 3.5 framework. My original plan was to use jQuery and...

Silverlight/ASMX/HTTPS: browser challenges end-user for credentials

I am trying to connect to a secured ASMX web service over HTTPS using Silverlight 4. When I add the web service reference I get challeged for credentials and I get warned that those credentials will be sent in clear text over the network; however, since the data is transported over HTTPS this should not be a concern. The resulting Serv...

A call error on a web method using ajax platform... Unable to connect to the remote server ?

the methods below used to work but now I get this error: Error: Sys.Net.WebServiceFailedException: The server method ' failed with the following error: System.Net.WebException-- Unable to connect to the remote server how can I fix it? function CallMe() { // call server side method PageMethods.GetData(function (result) { ...

Why does my WebService call fail only for one user?

I have a simple WebService method that returns database results as a DataSet. This method fails for one user in the company but works for everyone else Here is the crash: CRASH! GetCustomer - ExtractDomesticCommercialState: Exception:InvalidOperationException Message:There is an error in XML document (1, 877). Source: System...

WCF Client consuming ASMX Web Service with Soap Header

...