.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ASMX on IIS 5.1

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net


I have webservice hosted on IIS 5.1. Most of the time is working fine but sometimes it fails for one odd client. I have checked the IIS logs and the sc-status is 400 (bad request). This fails only occassionaly and client is getting error on receive (the connection was forcibly closed). I know the webservice is working as another 43 times a day it doesn't fail. Do you guys have any advice how could I get more detailed logs or error description in IIS 5.1? (i know 6.0 has some extra stuff but no lluck with XP)

View Complete Post

More Related Resource Links

Posting data to ASMX and return Object for jQuery


I am using fluent NHibernate with WebForms and I am trying to build a page where I allow a user to post a status update on their profile page and I a using a .asmx WebService to post the data to the database and then returnig a StatusUpdate instance to the page to be used by jQuery. I have a couple problems.

1) First off when I return a string from the WebService(i was testing) the textbox where the user enters their status doesnt empty the contents. And since the page doesnt refresh even if I manally clear out the textbox and put in something else, it still posts the previous status to the database again. How do I fix this?

2) Secondly, when I return the StatusUpdate Object from the Webservice I cant the results to display anything. Like I sad, Im using jQuery to make an AJX call to the WebService.

Here is my code:

User Profile Page:

Status: <asp:Label ID="status" runat="server"></asp:Label><span style="font-size:.7em;"><asp:Label ID="statustime" runat="server"></asp:Label></span><br />
<textarea id="statusBox" rows="3" cols="40"></textarea><br />
<input type="button" value="Update Status" onclick="SetStatus(); return false;

Wicked Code: Running ASMX Web Services on STA Threads


Jeff Prosise describes performance problems in an ASMX Web service that relied on legacy COM and Visual Basic 6.0 to perform key processing tasks and the approach he took to find a fix.

Jeff Prosise

MSDN Magazine October 2006

Service Station: All About ASMX 2.0, WSE 3.0, and WCF


The release of the Microsoft® . NET Framework 2. 0 reshapes the Web services landscape in several interesting, and perhaps confusing, ways. So this month I'm going to field some of the most common questions related to ASP.

Aaron Skonnard

MSDN Magazine January 2006

Service Station: Run ASMX Without IIS


When the Microsoft® . NET Framework first shipped, it introduced a breakthrough Web services framework known as ASMX. The motivation behind the ASMX design was to simplify the process of developing Web services as much as possible so that even if you're not an XML expert, you can get a Web service up and running.

Aaron Skonnard

MSDN Magazine December 2004

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

ASMX ws: An unexpected error occurred on a receive; failing intermittently



we I have asmx web service, this seems to be working fine for 25 client machines but one site keeps failing. The client gets a small dataset and tries to send it across to server to process. The dataset saved in XML file only makes 450 - 550kB. The web service is contacted twice in a short time every half an hour. The other smaller dataset (50kB) goes across everytime without any troubles. This site is not trying to send the biggest dataset, other site are sending much bigger datasets without problem. The catch is this failing site keeps retrying for 20 times (10 hours) in average and then eventually goes across. I don't think the service webmethod is erroring out as that is all wrapped up in the try and catch and the exception is not getting thrown, also every other try for the exact same webmethod used by any other client site seems to be working fine.

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Ne

VS2005 calling VS2010 asmx service returns empty string


Anyone have any experience with this?

We are using VS 2005 for the front end, and vs 2010 for the web services part (asmx), not wcf yet.


Web service works just like the vs2005 when run locally, no problems.


Connecting to it from a test app returns an empty string. Connecting to a 2005 app doesn't!

Anyone run into this before or have a suggestion? Surely vs 2005 can connect to web services from a later version?






How to call ASMX from Javascript


I am very new to web services so this may be a very silly question: how do you call an ASMX web-service sychronously, so that the web-page doesn't finish loading until the web service has sent its response?  I need my Javascript calling function to sit tight until the web-service returns its response; at the moment, it continues execution without waiting.

I have a web service defined in an ASMX file:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data.SqlClient;
using System.Configuration;

/// <summary>
/// Summary description for MyService
/// </summary>
[WebService(Namespace = "http://www.myservice.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
public class MyService: WebService 
    public MyService() 

        //Uncomment the following line if using designed components 

    public string ValidateInfo (string arg 1, string arg2)
        return response;

In my ASPX file I have a reference to my web service:

How do consume an ASMX service?



I need to consume and ASMX service on my website.

This service has to be authenticated and results would be displayed on my website.

Can you please give be step by step instructions on how do i do it?

I am using VS 2008 VB or C# is fine by me.

I had checked on various forums and its not really giving me the required steps (baby steps here)

Thanks a lot


Trying to call an asmx web service from a test project

I am trying to create a proxy for an asmx web service. The only thing I find in Visual Studio 2008 is a service reference. How do I call an asmx web service with a service reference? Certified Geek. Professional Data dude.

jQuery calls asmx web service

I have a jQuery method that calls a .asmx web service.  the jquery method only executes one time but the web serivce executes multiple times.  Is there a way this could happen or ways to debug this beyond breakpoints in the c# code and alerts in the jQuery.

Lifetime of asmx web service/IIS application

Hi I have a web service (asmx). I want to add a functionality where in I have to do polling for data on a URL. I added a timer and in the timer elapsed event handler I am checking for the data. (Is it a good design? Is there something better than timer for this in ASP.NET?) But what I observed is that, after some time, if the web service is ideal (no request are sent to the service), the timer event doesn't fire. Is this something by design or I have some configuration issues here. Is it very standard that if web site is ideal then the objects in that site are destroyed? I have few static objects maintaining the state should I not keep them there? Is there any configuration that allowes the service to stay alive dispite of the request sent to it or not? When web site is ideal, its only the website which goes in ideal state or IIS goes in ideal state? I mean my timer stopped is it because nobody called by web service or its because nobody called the IIS on that machine (any other web service or web application deployed on IIS)?

Unable to call an asmx web service using windows authentication from a Service workflow

Hello, I need to use an existing asmx service from inside my service workflow and I am unable to call it. This asmx service is hosted in a web application with iis set to windows authentication, anonymous is not allowed. I need to send the authentication, only way seems too be using transport for basicHttpBindings. Every time I try to call the service I get an error saying that there is nothing listening to the url of the service generated automatically by VS when I added the Service Reference ? my web config <configuration> <configSections> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <protocolMapping> <add scheme="http" binding="wsHttpBinding" bindingConfiguration="WindowsCreds" /> </protocolMapping> <bindings> <basicHttpBinding> <binding name="UtilitiesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"

SP 2010 ASMX Call to Upload Doc to Library

What is the recommended approach to use a web service (Lists?  Copy? ?? ) to add a document to a SharePoint document library from a website OUTSIDE of Sharepoint. I can add a ListItem from XML that provides the fields about the document, but I can't figure out how to attach a document to the List Item.  If it is AddAttachment, then the question is how do I get the DocId to attach it to?  ...and can I do it in one step?

Problem With SharePoint Designer 2010 and the Search.asmx Web Service

I've created a web service datasource on a 2010 site using SharePoint Designer. When I try to make use of the datasource on a page I get the "The server returned a non-specific error when trying to get data from the data source..." message. The datasource connects to _vti_bin/search.asmx. I am using the QueryServiceSoap port and operation QueryX. I've tried various queryXml strings, including site & people searches using both SQL and keyword syntax. eg <?xml version="1.0" encoding="utf-8" ?><QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000"><Query domain="QDomain"> <SupportedFormats><Format>urn:Microsoft.Search.Response.Document.Document</Format></SupportedFormats> <Context>   <QueryText language="en-US" type="MSSQLFT"><![CDATA[ SELECT Size, Rank, Path, Title, Description, Write, Filename, Description, Author FROM scope() WHERE CONTAINS ('"Lorum"') AND  ( ("SCOPE" = 'All Sites') )   ORDER BY "Rank" DESC ]]></QueryText> </Context> <Range><StartAt>1</StartAt><Count>20</Count></Range> <EnableStemming>false</EnableStemming> <TrimDuplicates>true</TrimDuplicates> <IgnoreAllNoiseQuery>true&l

How to create .asmx file

I have a web service project that was created using Visual Studio 2005. In the IDE I can see that there is an .asmx file, and a source code file for the web service. I had doubts that my .asmx file (Starpe.asmx) was reflecting my code changes, so I searched for the .asmx file using windows search and then deleted it with the intention of re-creating it through a rebuild. I can still see the .asmx file in the IDE, and my code works. However I selected the .asmx file in the IDE and then did properties. I went to the path where it said the file was located, but the .asmx file is not there?? asmx files from other web services are there, but not the Starpe.asmx file. So how do I rebuild/recreate the .asmx file? Sure it shows in my IDE project, but it no longer exists on my hard drive.    

Should time date stamp on .Asmx file change when project is rebuilt?

I have a web service project. The web service is named Recalc.asmx and it has a code behind file namedRecalc.asmx.vb Now if I make a change to my web service .vb code and then recompile the project, should my Recalc.asmx filebe updated as well? In windows explorer I see that the time date stamp of my Racalc.asmx.vb file changes to the date of the last change.But the time date stamp of the Recalc.asmx file does not change? Why is that? My original thinking was that I would simply need to copy the Recalc.asmx file to the test server. But the date stillshows it's original creation date of 7/1/2010 and not the date of the last rebuild as I was hoping it would do?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend