我的webapp(ASP.NET 2.0)在同一臺機器上使用webservice(1.1框架上的asmx) 。獲得XML後,我將它傳遞到 XslCompiledTransform
用於將XML轉換爲HTML,並且工作正常。XslCompiledTransform.Load()引發System.IO.FileNotFoundException
昨天我經常收到System.IO.FileNotFoundException
,不知道是什麼原因導致了這類問題。
第一次看,我認爲這是關於C:\ WINDOWS \ TEMP的讀/寫權限,然後我確定給它的網絡服務的全部權限(也是最後的每個人 - - !)但 它並沒有幫助。
任何想法或解決方案將不勝感激。
-------------------- stack trace --------------------------
Exception: **System.IO.FileNotFoundException**
**Could not find file 'C:\WINDOWS\TEMP\sivvt5f6.dll'.**
at System.IO.__Error**.WinIOError**(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32
rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromDom(CompilerParameters options, CodeCompileUnit[] compilationUnits)
at System.Xml.Xsl.Xslt.Scripts.CompileAssembly(List`1 scriptsForLang)
at System.Xml.Xsl.Xslt.Scripts.CompileScripts()
at System.Xml.Xsl.Xslt.QilGenerator.Compile(Compiler compiler)
at System.Xml.Xsl.Xslt.**Compiler.
Compile**(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at System.Xml.Xsl.**XslCompiledTransform.Load**(String stylesheetUri, XsltSettings settings, XmlResolver stylesheetResolver)
好奇。我假設所有3具有相同的配置(特別是在主web.config/machine.config中的臨時目錄設置)? – 2008-11-07 08:00:57