A
amy
the following is my WebMethod (GetPrc) to launch a batch
file
which will take about 10 seconds to be processed.
I get the "The page cannot be displayed...HTTP 500 -
Internal server error"
for both do-real-job hello.bat and the empty hello.bat
file.
[WebMethod]
public string GetPrc( string sdnum , bool prp )
{
try
{
Process process = new Process() ;
process.StartInfo.FileName = "hello1.bat" ;
process.StartInfo.Arguments = "" ;
process.Start() ;
process.WaitForExit() ;
return "Hello PDA";
}
catch( Exception e )
{
throw new Exception( "Error running batch
file: " + e.Message ) ;
}
}
I don't have problem with hello WebMethod.
Could you tell me what I am missing ?
THANKS!
file
which will take about 10 seconds to be processed.
I get the "The page cannot be displayed...HTTP 500 -
Internal server error"
for both do-real-job hello.bat and the empty hello.bat
file.
[WebMethod]
public string GetPrc( string sdnum , bool prp )
{
try
{
Process process = new Process() ;
process.StartInfo.FileName = "hello1.bat" ;
process.StartInfo.Arguments = "" ;
process.Start() ;
process.WaitForExit() ;
return "Hello PDA";
}
catch( Exception e )
{
throw new Exception( "Error running batch
file: " + e.Message ) ;
}
}
I don't have problem with hello WebMethod.
Could you tell me what I am missing ?
THANKS!