By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,189 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,189 IT Pros & Developers. It's quick & easy.

Accessing files and folders on remote server - SERVER ERROR

P: n/a
Hi,

I've currently setup a local user as described in:

http://msdn.microsoft.com/library/de...SecNetHT01.asp

This users has been created on the remote server, and locally on our
web farm servers. All access to NTFS file system has been setup and the
users local privileges. However, when I add the

<identity impersonate="true" userName="YourAccount"
password="YourStrongPassword" />

Code in the web.config file, the website starts behaving in an
unpredictable manner - mainly blowing up with the following error:

Server Error in '/admin' Application.
--------------------------------------------------------------------------------

Cannot execute a program. The command being executed was
"c:\windows\microsoft.net\framework\v1.1.4322\csc. exe" /noconfig
@"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tem porary ASP.NET
Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".
Description: An unhandled exception occurred during compilation using
the CodeDomProvider 'Microsoft.CSharp.CSharpCodeProvider'. Please
review the stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Runtime.InteropServices.ExternalException:
Cannot execute a program. The command being executed was
"c:\windows\microsoft.net\framework\v1.1.4322\csc. exe" /noconfig
@"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tem porary ASP.NET
Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[ExternalException (0x10b): Cannot execute a program. The command being
executed was "c:\windows\microsoft.net\framework\v1.1.4322\csc. exe"
/noconfig @"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tem porary
ASP.NET Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".]

System.CodeDom.Compiler.Executor.ExecWaitWithCaptu reUnimpersonated(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +2054
System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +260
System.CodeDom.Compiler.CodeCompiler.Compile(Compi lerParameters
options, String compilerDirectory, String compilerExe, String
arguments, String& outputFile, Int32& nativeReturnValue, String
trueArgs) +383

System.CodeDom.Compiler.CodeCompiler.FromFileBatch (CompilerParameters
options, String[] fileNames) +548
System.CodeDom.Compiler.CodeCompiler.FromDomBatch( CompilerParameters
options, CodeCompileUnit[] ea) +428
System.CodeDom.Compiler.CodeCompiler.FromDom(Compi lerParameters
options, CodeCompileUnit e) +90

System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromDom(Co mpilerParameters
options, CodeCompileUnit e) +37
System.Web.Compilation.BaseCompiler.GetCompiledTyp e() +227


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300
If I remove the impersonation - the site works fine, apart from the
fact I can't read/write to the remote server. I have googled till I'm
blind, anyone any ideas?

Feb 15 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.