0

From my starting webpage on button click I am calling a WCF web service which will run for a while (10 - 15 mins) and on my starting webpage message is getting displayed "Please wait service is running".

Once actions from my WCF service call is finished it returns to my web page and results form my web service should be displayed on my starting webpage.

Now above is working fine on local host but as I deploy the code on IIS control from web service does not return to the starting page and message "Please wait service is running" does not disappear.

I am not sure what can be the issue may be session is getting timed out. Can anyone please help me out ?

Code sample from starting page button click is shown below. Once RunScript is executed results should be displayed on starting page.

try
{
    //Run the scripts
    List<ScCon.TestService.Sel_Test> SelTests_Returned_list = TSSClient.RunScripts(ScriptsToRun_list);

    TSSClient.Close();

    List<StringTestResult> strResult_List = new List<StringTestResult>();

    foreach (TestService.Sel_Test ST in SelTests_Returned_list)
    {
        strResult_List.Add(new StringTestResult(ST));
    }

    TCResultsGridView.DataSource = strResult_List;
    TCResultsGridView.DataBind();
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
sachin
  • 15
  • 4
  • 15 minutes? wow. you have serious problems with that architecture. – naveen Apr 24 '14 at 11:26
  • Its actually a testing framework. Where selenium test scripts are initiated from UI. So once execution is complete only then results are published on UI which is not happening when code is deployed on IIS in Dev entire process works well. – sachin Apr 24 '14 at 11:48
  • Even on IIS it does work if webservice returns results in less then 2 mins approx. – sachin Apr 24 '14 at 11:54
  • This has resolved my issue: [link]http://stackoverflow.com/questions/2414441/how-to-increase-request-timeout-in-iis7-0 – sachin Apr 25 '14 at 09:09

1 Answers1

0

Possible solution to handle the situation could be 1. Bind your web service to IIS first. 2. Add that web service as a reference to your solution. If it is running then they you will be able to add it in your solution. 3. Create a object of that webservice in your code and then you can use the functions.

Amnesh Goel
  • 2,617
  • 3
  • 28
  • 47
  • I am doing exactly as you said TSSClient is the instance of my webservice and RunScript is a function from my service. Service is also hosted in IIS. As soon as the control from my aspx file goes to service it does not comes back to from where call was made. – sachin Apr 24 '14 at 11:42
  • Is your service in running mode? Could you call web service method before binding it to your application? – Amnesh Goel Apr 24 '14 at 12:00
  • Yes service is running. On Button click I run the service and results from service I have to bind on as a grid on UI. I suppose problem is related to timeout as if I cut down my service execution time to under 2 mins entire process works fine. – sachin Apr 24 '14 at 12:07
  • Okay you can check one setting in your IIS. Go to IIS -> Application Pool -> Default App Pool -> Advance Settings -> Process Model -> Ping Enabled (set this to false). – Amnesh Goel Apr 24 '14 at 12:14
  • Already tried this hoping that will solve the issue but didn't :( – sachin Apr 24 '14 at 12:30