Ask a Question related to ASP.NET Security, Design and Development.
-
Abhi #1
Help: OWSADM hangs when executing from C# web service
Hi-
I'm trying to execute the C:\Program Files\Common Files\Microsoft
Shared\Web Server Extensions\50\bin\OWSADM.EXE programmatically from a
shell using the process.Start() method. I'm also impersonating as the
admin user and providing the login credentials through the
process.StartInfo.UserName and process.StartInfo.Password attributes.
I'm using ASP.NET 2.0 Beta 2.
Process process = new Process();
process.StartInfo.FileName = @"C:\Program Files\Common
Files....\OWSADM.EXE";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.Arguments = "-o install -p /LM/W3SVC/" + MyWebDir +
@" -u Admin"
process.StartInfo.UserName = "<Admin Name Here>";
process.StartInfo.Password = ConvertToSecureString("<Admin Password
Here>");
process.Start();
process.WaitForExit();
string output = process.StandardOutput.ReadToEnd();
string error = process.StandardError.ReadToEnd();
I've implemented ConvertToSecureString my self to convert a string into
a SecureString
private SecureString ConvertToSecureString(string str)
{
SecureString secureString = new SecureString();
foreach (char c in str)
{
secureString.AppendChar(c);
}
return secureString;
}
For some reason when I execute the Start() method then the OWSADM hangs
in memory. It does not return any error code or any other output. If I
provide an invalid password then it complains about login failures.
The same command works fine if I choose to run it directly from the
command prompt on that machine. However it does not run from my C# web
method.
The machine is running Windows Server 2003 Enterprise edition. (3.06
GHz, 4 GB of RAM!)
Note: When looking at the hung process"OWSADM" using Process Explorer I
see that there's this KeyedEvent
"\KernelObjects\CritSecOutOfMemoryEvent"
Any help will be greatly appreciated.
Thanks!
-abhi
Abhi Guest
-
Coldfusion service hangs when logging into coldfusionadministrator
Hi, After changing the maximum number of connections to 1, I can no longer enter the coldfusion administrator. He allows me to enter the... -
Executing a web service dll directly
Hi, Is it possible to load a web service dll and directrly invoke its methods using relection to avoid installing a local web service ? Is there... -
stepping through web service hangs in VS
I have a web service that has started exhibiting new/strange behavior when debugging. I start the web service from Visual Studio but when execution... -
#9954 [Com]: php.exe hangs when executing external batch file
ID: 9954 Comment by: kkpmanju at yahoo dot com Reported By: dave973 at netzero dot net Status: Closed Bug... -
hangs on shutdown, must restart oracle service
Can anyone tell me why sometimes Oracle hangs on shutdown and the only way to fix it is to restart the oracle service? When this occurs, I also...



Reply With Quote

