Hi,
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
Is there any suggestion I am facing this problem from a week but did not find any solutionCode://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) { GetWebUrl(); } 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 } }


Reply With Quote


Bookmarks