So I've got an application which must be accessed via only a single user via command line for licensing reasons. My solution was to make a web service running under that valid user which is called from my other applications which need to use this remote
application. Seems simple and straightforward.
The interfacing method between client and server in this web service sends only two parameters, the path to the source file for the remote application to use and the destination to place the result after it is completed and returns a string as a result.
The web service creates a new CMD process using ProcessStartInfo generated from the values of the parameters. I'm redirecting the input and output streams of this process so I can get the resulting output from the call to the application to determine success/failure
back on the client side, so I have UseShellExecute set to false.
So remember, this web service is running under the account that has license permissions to this application. I confirmed this by adding Environment.UserName to the return string in the method which starts the process executing the command line.
However, when I test this it is acting like this isn't the proper user. I've quintuple checked that I am using the proper user and that the application behaves properly when I make the command li
View Complete Post