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="tr ue" userName="YourA ccount"
password="YourS trongPassword" />
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\mic rosoft.net\fram ework\v1.1.4322 \csc.exe" /noconfig
@"C:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2\Temporary ASP.NET
Files\admin\1af b246b\8ae84806\ pu6rzxdn.cmdlin e".
Description: An unhandled exception occurred during compilation using
the CodeDomProvider 'Microsoft.CSha rp.CSharpCodePr ovider'. Please
review the stack trace for more information about the error and where
it originated in the code.
Exception Details: System.Runtime. InteropServices .ExternalExcept ion:
Cannot execute a program. The command being executed was
"c:\windows\mic rosoft.net\fram ework\v1.1.4322 \csc.exe" /noconfig
@"C:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2\Temporary ASP.NET
Files\admin\1af b246b\8ae84806\ pu6rzxdn.cmdlin e".
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:
[ExternalExcepti on (0x10b): Cannot execute a program. The command being
executed was "c:\windows\mic rosoft.net\fram ework\v1.1.4322 \csc.exe"
/noconfig @"C:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2\Temporary
ASP.NET Files\admin\1af b246b\8ae84806\ pu6rzxdn.cmdlin e".]
System.CodeDom. Compiler.Execut or.ExecWaitWith CaptureUnimpers onated(IntPtr
userToken, String cmd, String currentDir, TempFileCollect ion tempFiles,
String& outputName, String& errorName, String trueCmdLine) +2054
System.CodeDom. Compiler.Execut or.ExecWaitWith Capture(IntPtr
userToken, String cmd, String currentDir, TempFileCollect ion tempFiles,
String& outputName, String& errorName, String trueCmdLine) +260
System.CodeDom. Compiler.CodeCo mpiler.Compile( CompilerParamet ers
options, String compilerDirecto ry, String compilerExe, String
arguments, String& outputFile, Int32& nativeReturnVal ue, String
trueArgs) +383
System.CodeDom. Compiler.CodeCo mpiler.FromFile Batch(CompilerP arameters
options, String[] fileNames) +548
System.CodeDom. Compiler.CodeCo mpiler.FromDomB atch(CompilerPa rameters
options, CodeCompileUnit[] ea) +428
System.CodeDom. Compiler.CodeCo mpiler.FromDom( CompilerParamet ers
options, CodeCompileUnit e) +90
System.CodeDom. Compiler.CodeCo mpiler.System.C odeDom.Compiler .ICodeCompiler. CompileAssembly FromDom(Compile rParameters
options, CodeCompileUnit e) +37
System.Web.Comp ilation.BaseCom piler.GetCompil edType() +227
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.2300;
ASP.NET Version:1.1.432 2.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?