Accessing files and folders on remote server - SERVER ERROR

P

phil.stollery

Hi,

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/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\Temporary 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\Temporary 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\Temporary
ASP.NET Files\admin\1afb246b\8ae84806\pu6rzxdn.cmdline".]

System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +2054
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr
userToken, String cmd, String currentDir, TempFileCollection tempFiles,
String& outputName, String& errorName, String trueCmdLine) +260
System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters
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(CompilerParameters
options, CodeCompileUnit e) +90

System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDom(CompilerParameters
options, CodeCompileUnit e) +37
System.Web.Compilation.BaseCompiler.GetCompiledType() +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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top