• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1521
  • Last Modified:

ASP.NET IIS issue with Sharepoint

We are running a MOSS 2007 server with Ascentn Agilepoint workflow on top. Everything works fine till any user has >42 items in their workflow. 42 and below eveything works fine. However when 43 is hit MOSS bombs out on the users workstation.
I recieve the following error/warning on the MOSS server.
Event Type:      Warning
Event Source:      ASP.NET 2.0.50727.0
Event Category:      Web Event
Event ID:      1309
Date:            10/22/2008
Time:            4:04:55 PM
User:            N/A
Computer:      MOSS
Description:
Event code: 3001  
Event message: The request has been aborted.  
Event time: 10/22/2008 4:04:55 PM  
Event time (UTC): 10/22/2008 9:04:55 PM  
Event ID: 44c2db04d85d4cc4831a49beaf4e719c  
Event sequence: 8  Event occurrence: 1  
Event detail code: 0    

Application information:      
Application domain: /LM/W3SVC/1836688966/Root-1-128691827650712080      
Trust level: Full      
Application Virtual Path: /      
Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\5555\      
Machine name: MOSS    

Process information:      
Process ID: 1748      
Process name: w3wp.exe      
Account name: Domain\xxxxxxxx  
 Exception information:      
Exception type: HttpException      
Exception message: Request timed out.    

Request information:      
Request URL: http://MOSS:5555/workflow/default.aspx     
Request path: /workflow/default.aspx      
User host address: 192.168.1.119      
User: domain\simpson      
Is authenticated: True      
Authentication Type: NTLM      
Thread account name: domain\xxxxxxx    
Thread information:      
Thread ID: 1      
Thread account name: domain\xxxxxxx    
Is impersonating: False      
Stack trace:
    Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I'm not sure where the fault is or really how to address the problem.
0
LP_Tech
Asked:
LP_Tech
1 Solution
 
LP_TechAuthor Commented:
The problem ended up being a problem in the agile point code.
private static string a(string A_0, string A_1)
{
    ProcessStartInfo startInfo = new ProcessStartInfo(A_0, A_1);
    startInfo.UseShellExecute = false;
    startInfo.RedirectStandardInput = false;
    startInfo.RedirectStandardOutput = true;
    startInfo.RedirectStandardError = true;
    startInfo.CreateNoWindow = true;
    string str = string.Empty;
    Process process = Process.Start(startInfo);
    try
    {
        process.WaitForExit();
        str = process.StandardOutput.ReadToEnd();
        str = str.Replace("\n", string.Empty).Replace("\r", string.Empty);
    }


&&.

MSDN Article - http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardoutput.aspx

Very important part of this article:

Synchronous read operations introduce a dependency between the caller reading from the StandardOutput stream and the child process writing to that stream. These dependencies can cause deadlock conditions. When the caller reads from the redirected stream of a child process, it is dependent on the child. The caller waits for the read operation until the child writes to the stream or closes the stream. When the child process writes enough data to fill its redirected stream, it is dependent on the parent. The child process waits for the next write operation until the parent reads from the full stream or closes the stream. The deadlock condition results when the caller and child process wait for each other to complete an operation, and neither can continue. You can avoid deadlocks by evaluating dependencies between the caller and child process.

Heres what MSDN says youre not supposed to do (call WaitForExit() before ReadToEnd())  which is exactly what is being done in the code above:

// Start the child process.
 Process p = new Process();
 // Redirect the output stream of the child process.
 p.StartInfo.UseShellExecute = false;
 p.StartInfo.RedirectStandardOutput = true;
 p.StartInfo.FileName = "Write500Lines.exe";
 p.Start();
 // Do not wait for the child process to exit before
 // reading to the end of its redirected stream.
 // p.WaitForExit();
 // Read the output stream first and then wait.
 string output = p.StandardOutput.ReadToEnd();
 p.WaitForExit();
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now