Is it possible to run STSADM from an ASP.NET application that is residing in the _layouts folder?
I have copied this code on this page.
When it runs the return message is Access Denied.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Process.Start will cause STSADM to run under the ASPNET worker process account
So if you give this account permission to use STSADM then you have to be sure that your web page correctly restricts what can be done and by whom
+10 for tekiegreg’s CAUTION comment – if you get this wrong it could go nuclear!
Perhaps a better way to do this is to use the object model Microsoft.SharePoint.Administration as most everything that can be done though STSADM can be done through the object model as of WSSv3
This will have a few advantages 1) No parsing of console.out strings 2) You should be able to impersonate the authenticated user so then STSADM/SharePoint become responsible for determining what the user is allowed to do.