DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008

    Web Service Time Out Problem After Two Calls


    I am calling a web service in my ASP.NET (2.0) application. Web Service return a audio recording URL which i pass to Window Media player object .

    it works fine for first two call but for third call it throws exception

    "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> The operation has timed out".

    bellow is the code
    //Create a calss which is inherited by the web service proxy calss
    public class ProxyChild : WebServiceProxy
    public ProxyChild()
    {}protected override WebRequest GetWebRequest(Uri uri) 
    HttpWebRequest webRequest = (HttpWebRequest)base.GetWebRequest(uri);
    webRequest.KeepAlive = false; 
    webRequest.ReadWriteTimeout = 600000;
    webRequest.Timeout = 600000;
    return webRequest; 
    //Main Class which call web service method
    public partial class AudioPlayer : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    private void GetWebUrl() 
    string WebAccessPath=null; 
    StringBuilder sb = new StringBuilder();
    CampaignManagement campaignManagment = new ProxyChild();
    WebAccessPath = campaignManagment.GetUrl();
    sb.Append("<OBJECT ID=\"MediaPlayer\" WIDTH=\"310\" HEIGHT=\"100\""); 
    sb.Append("CLASSID=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" STANDBY=\"Loading ");
    sb.Append("Windows "); 
    sb.Append("Media Player components...\" TYPE=\"application/x-oleobject\" VIEWASTEXT> ");
    sb.Append("<PARAM NAME=\"FileName\" VALUE=\"" + WebAccessPath + "\"> "); 
    sb.Append("<PARAM name=\"autostart\" VALUE=\"true\"> ");
    sb.Append("<PARAM name=\"ShowControls\" VALUE=\"true\"> "); 
    sb.Append("<param name=\"ShowStatusBar\" value=\"true\"> ");
    sb.Append("<PARAM name=\"ShowDisplay\" VALUE=\"false\"> "); 
    sb.Append("<EMBED TYPE=\"application/x-mplayer2\" NAME=\"MediaPlayer\"> ");
    sb.Append("</EMBED> "); 
    sb.Append("</OBJECT> ");
    this.AudioPlayerdiv.InnerHtml = sb.ToString();// AudioPlayerdiv is the Name of server side div
    Is there any suggestion I am facing this problem from a week but did not find any solution
    Last edited by Hack; 06-19-2008 at 08:25 AM. Reason: Added Code Tags

  2. #2
    Join Date
    Dec 2007
    Have you been able to profile GetWebURL and find a line of code where it hangs? My suspicion would be some kind of threadlock over a resource in the constructor to ProxyChild, if the previous two instances are still waiting to be handled by garbage collection?

    Stephen Lowe
    disclaimer: though I work for Microsoft as an Architect Evangelist, my opinions (and occasional errors) are my own.

Similar Threads

  1. Problem with web service call from applet
    By Slava Gomzin in forum Java
    Replies: 3
    Last Post: 01-10-2008, 05:58 PM
  2. Java Web Service Problem
    By wakanpaladin in forum Java
    Replies: 1
    Last Post: 12-07-2007, 02:27 PM
  3. Web Service Distribution Problem
    By Deepak Chadda in forum .NET
    Replies: 0
    Last Post: 08-13-2003, 09:23 AM
  4. Referencing remote DLL in Web Service
    By Partha in forum .NET
    Replies: 0
    Last Post: 02-13-2003, 12:21 AM
  5. web service authentication mechanisms
    By Dan Davis in forum .NET
    Replies: 0
    Last Post: 05-16-2001, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.