Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is more of a general c# question...
A while ago I tried to get execute a program on the file system on click of a button on a page. At the time it was hg that I was trying to execute. I had some random permission issues. I ended up shelving that functionality due to time.
The issue requirement has popped up again except this time with another file system program.
The application is impersonating an administration account but I still have this issue.
Before I go down the wrong path and spend more time. Does annyone know about what I should specifically look out for when trying to do this? Any info would be helpful.
I forgot to mention that notepad which is just fine. I'll have a proper stack trace tomorrow. I'm in bed with my nexus 7 right now :-)
We did something like that a while ago. Here the (VB.NET) code: www.lucrasoft.nl/downloads/AnthonyImpersonation.rar
We use the Impersonator class to write to an XML file for the FileZilla FTP service. After that we restart the FileZilla service using a bat file (that's done using the ProcessRunner class).
It's pretty old code, so I can't tell you if it'll work or not. And I'm pretty sure you need full trust for this :)
You can convert it using one of the converter tools (Like Telerik or DeveloperFusion).
I'll give it a try.
Just a bit more info about my original error:
Lots of exceptions in "v" (v is just for testing... don't mock my variable name!) after running var v = Process.Start(proc);
Running notepad.exe doesnt have any of these.
ps. I have not tried Floris's impersonation code yet... just trying to figure out why this doesnt work and if impersonation in code is actually required since I already impersonate an administrator set in the web.config.
Please provide the Windows error code for the Win32Exception. Win32Exception.ErrorCode and Win32Exception.NativeErrorCode - this can actually be mapped to a description.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted