Solved

Command execution

Posted on 2013-01-09
2
193 Views
Last Modified: 2013-01-10
Hi,

I am having the following command which needs to be execute through the .net application

C:\Windows\System32\inetsrv>  appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic.NetAppPool"


I used the above command as follows

 protected void Button1_Click(object sender, EventArgs e)
        {
         

    string command = string.Format(@"/C C:\Windows\System32\inetsrv> appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic.NetAppPool");


       ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe");
       cmdsi.Arguments = command;       Process cmd = Process.Start(cmdsi);

}


but it is not working, can you guide what went wrong.
0
Comment
Question by:praveen1981
2 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 38758832
0
 

Author Closing Comment

by:praveen1981
ID: 38762707
Thanks a lot for your solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short film showing how OnPage and Connectwise integration works.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now