asmx

How do you pull the URL for an ASP.NET web reference from a configuration file in Visual Studio 2008?

I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary. I know I've done this before, but can't seem to remember how. Thanks for your help. update - I've manually driven around this for the time bei...

WMI calls from WebService

So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservice no longer allows me to execute the WMI method calls. However ...

How do I Update a GridView from a Page Method from code behind?

How do I update a Gridview on a aspx page from a webmethod? Here is my code. [WebMethod] public static string GetDate() { return DateTime.Now.ToString(); } I can't use the "findcontrol" or the "this" methods so I need some help. ...

Does ASP.net health monitoring work with asmx web services

I'm trying to use ASP.net health monitoring to log unhandled exceptions from an asmx web service. I've enabled health monitoring in the web.config but it's not logging anything. Does health monitoring work with asmx web services? I've googled around and seems other people have asked the same question but never got a definite answer. ...

WCF client consuming multiple asmx service that uses HTTP Cookies

I am trying to use the same http cookie (in effect a asmx sessionid), in multiple WCF client endpoints. The server has several endpoints, one of them is: AuthenticationService.asmx Login() <- Creates a HTTP cookie that is the servers ASP.NET sessionid Logout() <- Destroys the same cookies SomeOtherService.asmx DoSome...

Any way to make "find references" work for web methods?

I'm looking for a way to find references to a web method in other code that may use it. Right-click and choose find references doesn't make it through the wsdl interface to other classes in my solution that reference those web methods. This is part of a clean-up effort - I'm trying to remove outdated/old/unused methods. I can search b...

How to let an ASMX file output JSON

I created an ASMX file with a code behind file. It's working fine, but it is outputting XML. However, I need it to output JSON. The ResponseFormat configuration doesn't seem to work. My code-behind is: [System.Web.Script.Services.ScriptService] public class _default : System.Web.Services.WebService { [WebMethod] [ScriptMethod(U...

Why global.asax Application_Error method does not catch exceptions thrown by ASMX service?

And how to fix it. I'd like to log every thrown exception for maintenance purpose. ...

Testing custom SOAP Headers in ASMX.

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

best way to consume a webservice in an asp.net code behind

Hello, I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this? ...

Adding a Web Reference for SharePoint in Visual Studio 2008

Whenever I add a web reference for any Sharepoint web service in VS 2008, the preview window while adding the web reference shows the proper method names: Note CreateFolder: Before: And after, the CreateFolder method is not there I looked over the documentation at MSDN but it appears I am using it properly. Can anybody point out my...

What are all the valid ASP.NET Webmethod return types?

Can my webmethod only return strings like I see in all the asp.net site examples? ...

Connecting to an asmx webservice with WCF through a proxy

Hello, Sorry answer found while typing I am trying to connect to an external webservice that requires username/password authentication through a proxy. I am using Visual Studio Express 2008 to generate a service reference I have connected to the same webservice using a web reference.We only had to set a larger timeout because it ...

Custom DateTime XML Serialization

I would like to be able to Serialize a DateTime with a specific Time Zone that is not the server, nor is it client time. Basically, any time zone. Is it possible to override the DateTime serialization, in .Net2.0 webservices? I compile an xmlschema using xsd.exe, so I made an attempt using XmlSchemaImporter. The OnSerialize examples s...

ASP.NET Web Services (plural) or Web Service with multiple classes.

Hi All, I am struggling to make a decision regarding the correct organisation for a web service. Should I have multiple ASMX's representing the different functionality in the web service, or should I have a single ASMX? If I have multiple ASMX's, does this not constitute multiple web services? If I have a single ASMX, how do I organis...

Unable to access WebService

I have a webservice @ http://recpushdata.cyndigo.com/Jobs.asmx but I'm not able to access it though I am adding it as a WebReference properly. Any Help would be great. ...

asmx wsdl string length

I have a VB class in an .asmx file in Visual Studio 2008: public class foo public bla as String end class It generates the wsdl value: <s:complexType name="foo"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="bla" type="s:string" /> </s:sequence> </s:complexType> But what I want the wsdl to generate is: <xs:el...

asmx wsdl loading forever

I have a web service application which has suddenly stopped working. I have enabled directory browsing in IIS, and can view the application directory. I can view the xml files within the application directory, but I cannot view the .config files, nor can I view the wsdls of any of the web services. When I try to browse to http://serve...

Tools for testing web services

I want to perform integration testing of my webservices before shipping them out and am wondering if anyone can point out some tools for performing these tests automatically? I have both ASMX webservices as well as a few WCF ones. I want to be able to add this as a task to my build scripts and execute automatically if possible. What a...

How to pass parameters to a Web Method?

How to pass parameters to [WebMethod] in Asp.Net(C#) ? Can some one please explain the same with the help of an example? ...