473,779 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\b in\OWSADM.EXE programmaticall y from a
shell using the process.Start() method. I'm also impersonating as the
admin user and providing the login credentials through the
process.StartIn fo.UserName and process.StartIn fo.Password attributes.

Process process = new Process();
process.StartIn fo.FileName = @"C:\Program Files\Common
Files....\WSADM .EXE";
process.StartIn fo.UseShellExec ute = false;
process.StartIn fo.RedirectStan dardOutput = true;
process.StartIn fo.RedirectStan dardError = true;

process.StartIn fo.Arguments = "-o install -p /LM/W3SVC/" + MyWebDir +
@" -u Admin"

process.StartIn fo.UserName = "<Admin Name Here>";
process.StartIn fo.Password = ConvertToSecure String("<Admin Password
Here>");
process.Start() ;
process.WaitFor Exit();
string output = process.Standar dOutput.ReadToE nd();
string error = process.Standar dError.ReadToEn d();
I've implemented ConvertToSecure String my self to convert a string into
a SecureString

private SecureString ConvertToSecure String(string str)
{
SecureString secureString = new SecureString();
foreach (char c in str)
{
secureString.Ap pendChar(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 does complain 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 or RAM!)

Any help will be greatly appreciated.
Thanks!

Nov 17 '05 #1
0 1023

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1736
by: rjb | last post by:
Hi there I've a server which hosts couple of hundreds sites. From time to time I can't access some of the websites, all of them are ASP. HTML ones are fine. I've tried to use iisstate, but I can't seen any errors in the log, not even a warning. Also, there is nothing in the Event Viewer. The server is 2003 standard.
0
311
by: Manny | last post by:
Hi, Im trying to build an aspx page to show a CR report using the CRViewer object. Wenever I try executing the project using VS.NET 2003 the page never loads and it always hangs, it never shows any error on build or when it tries to execute. The worse thing about it is that it hangs the whole OS (XP Pro SP2) I have to hit the Reset button! BTW I've tried refering to the report through a CR published service and also from the same project...
0
1192
by: Manny | last post by:
Hi, Im trying to build an aspx page to show a CR report using the CRViewer object. Wenever I try executing the project using VS.NET 2003 the page never loads and it always hangs, it never shows any error on build or when it tries to execute. The worse thing about it is that it hangs the whole OS (XP Pro SP2) I have to hit the Reset button! BTW I've tried refering to the report through a CR published service and also from the same project...
9
2191
by: brendan_gallagher_2001 | last post by:
Hi I am seeing some strange behaviour on a windows (vb.net 1.1) service. Basically, what I see happening is that when the Timer1_Elapsed event fires, it attempts to execute Timer1.Stop() but takes a long time to do this. In the meantime, the Timer1_Elapsed event fires again and a new thread seems to try and also tries to execute Timer1.Stop(). Eventually, both threads manage to execute Timer1.Stop() and both threads execute the...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.