Re: why does this fail to run

From: Rob Y (ryacullo@telsource.com)
Date: 10/24/02


From: ryacullo@telsource.com (Rob Y)
Date: 23 Oct 2002 15:39:36 -0700


Andy,

I'm not sure if it's possible to run this from ASP.NET, but I'm
thinking it may be a permissions issue. I would set the IIS directory
permissions to not allow anonymous, and set the directory permission
to allow an account with adequate rights (ie. Administrator). Might
be worth a try, but it's just a guess.

Rob

"Andy" <a_wood20@hotmail.com> wrote in message news:<99a801c279a4$fe32e160$36ef2ecf@tkmsftngxa12>...
> Hi all,
>
> I am attempting to run a command prompt through an asp.net
> form. I am doing this through the
> system.diagnostics.process class. i know this works
> because i have it working within a VB.NET windows
> application the forms are running on a windows NT network,
> but for some reason it simply freezes the asp page, The
> commands that im trying to use are:
>
> NET USER DUMMYUSER {PASSWORD} /ADD
> EXIT
>
> The one time that it did run it gave me an error something
> along the lines of SYSTEM ERROR 5 ACCESS IS DENIED.here is
> my code:
>
> Private Sub AddUsers(ByVal Username As String, ByVal
> Password As String)
> Try
> Dim myProcess As System.Diagnostics.Process =
> New System.Diagnostics.Process()
> Dim s As String
> myProcess.StartInfo.FileName = "cmd.exe"
> myProcess.StartInfo.UseShellExecute = False
> myProcess.StartInfo.CreateNoWindow = False
> myProcess.StartInfo.RedirectStandardInput =
> True
> myProcess.StartInfo.RedirectStandardOutput =
> True
> myProcess.StartInfo.RedirectStandardError =
> True
> myProcess.Start()
> Dim sIn As StreamWriter =
> myProcess.StandardInput
> sIn.AutoFlush = True
>
> Dim sOut As StreamReader =
> myProcess.StandardOutput
> Dim sErr As StreamReader =
> myProcess.StandardError
> Response.Write(sErr.ReadToEnd.ToString
> & "<br>")
> sIn.Write("NET USER DUMMYUSER {Password} /ADD"
> & System.Environment.NewLine)
> sIn.Write("exit" & System.Environment.NewLine)
> s = sOut.ReadToEnd()
>
> If Not myProcess.HasExited Then
> myProcess.Kill()
> End If
>
> sIn.Close()
> sOut.Close()
>
> myProcess.Close()
> Response.Write(s)
> sErr.Close()
> Catch ex As Exception
> Response.Write(ex.Message & "<br>")
> End Try
>
> Any ideas
>
> thanks in advance
>
> Andy



Relevant Pages

  • Re: Some users are unable to access a site in sharepoint
    ... permission levels or groups on the sharepoint site? ... bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& ... I know it is some type of permissions issue because if I adde one of the ... users account to the administrators group on the sharepoint web servers ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Cbool problem
    ... Once I input a good sample string it ran correctly. ... > permissions to write to the directory. ... > "Joe Fallon" wrote in message ... >> I am now trying to use dynamic code execution in an ASP.Net application. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Property userAccountControl not found
    ... All user objects in AD have a userAccountControl attribute. ... Note that in the membership provider, it does not use the permissions of the user who was authenticated to search the directory. ... containerEntry, String filter, SearchScope searchScope, Boolean ... retrieveSAMAccountName, DirectoryEntry& userEntry, Boolean& ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Webdav and S:security_descriptor problem
    ... I writed class for updateing public folder security permissions. ... When I added permissions for user it work fine in debuging mode of VS.NET ... private string AddACE( ... System.Xml.XmlNode newNode = XMLRoot.ImportNode; ...
    (microsoft.public.exchange.development)
  • Re: Login failed for user
    ... I'm using the same connect string as on all my other sites. ... The DB owner is 'chic' and the schema name is 'abn'. ... View schema permissions> View database permissions> Effective ...
    (microsoft.public.sqlserver.programming)