Thanks Alan. Here is the Method I am invoking. The SAS process is working fine, is this Method that Execute the SAS process, that does not pass to the next line after Execution execute = storedProcess.Execute(); when the STored Process takes long time to execute. If I change the value on parmeter modelType to for example Factor, that makes the SAS stored process to compute less rows, and in that case the EXECUTE() method returns fine. my problem is when the stored process takes more than an hour. It process on the SAS side but looks like the Execute method is timing out. This is the code on my Method in the wrapper. using System; using System.Web.Services; using SAS.BI.AuthenticationService.ClientUserContext; using SAS.BI.StoredProcessService; using SAS.BI.StoredProcessService.Exec; using SAS.BI.StoredProcessService.IO; using System.Configuration; using System.Collections.Generic; [WebMethod] public bool RunStressGenDataModel(int HistoryOffsetDays, int PositionOffsetDays) { log.LogDebug("--------------------------------------------------------"); log.LogDebug("Starting RunGenModelStress"); string metadataServer="cpwnpsas01.corp.capitalpower.com"; string thread_id = DateTime.Now.ToString("yyyyMMddhhmmss"); string pRunType = "Daily"; string sourceDsn = "dsn=Allegro_Stress_Auth;Trusted_Connection=yes;database=allegro_stress"; string destDsn = "dsn=Allegro_Stress_Auth;Trusted_Connection=yes;database=allegro_stress"; DateTime HistoryDate = DateTime.Today.AddDays(HistoryOffsetDays); DateTime PositionDate = DateTime.Today.AddDays(PositionOffsetDays); string modelType = "_ALL_VALUES_"; int port = 8561; UserContext userContext = CreateUserContext(metadataServer, port); try { string storedProcLocation = ConfigurationManager.AppSettings["GenDataModelStress"].ToString(); StoredProcess storedProcess = new StoredProcess(userContext, storedProcLocation); log.LogDebug(String.Format("RunGenModelStress using location of {0}", storedProcLocation)); /* * If the parameter names in the Stored Proc ever change, you have to change them here as well */ storedProcess.SetPromptValue("thread_id", thread_id); storedProcess.SetPromptValue("connect_source", sourceDsn); storedProcess.SetPromptValue("connect_destination", destDsn); storedProcess.SetPromptValue("HIST_DATE", HistoryDate.ToString("MM/dd/yyyy")); storedProcess.SetPromptValue("POS_DATE", PositionDate.ToString("MM/dd/yyyy")); storedProcess.SetPromptValue("pRunType", pRunType); storedProcess.SetPromptValue("p_model_type", modelType); Execution execute = storedProcess.Execute(); return LogStoredProcessResult(execute, storedProcLocation); } catch (Exception ex) { throw new Exception(ex.Message); } }
... View more