我已经在我们的服务器上部署了一个win表单应用程序。用户通过终端服务登录。如果用户在第二天早上尝试打开应用时仍然保持登录过夜,则会收到以下错误。
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\[USERX]\Local Settings\Temp\11\24eujku3.tmp'.
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)
at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at Telerik.WinControls.RadImageShape.Deserialize(String state)
at Telerik.WinControls.RadImageShapeTypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text)
at Telerik.WinControls.XmlSerialization.ObjectSerializationInfo.ConvertFromString(String value)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadObjectElement(XmlReader reader, Object parentObject, Object toRead)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadCollectionElement(XmlReader reader, Object collectionOwner, IList toRead, Boolean disposeObjects)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadElementInObject(XmlReader reader, PropertyDescriptor property, Object toRead)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadObjectElement(XmlReader reader, Object parentObject, Object toRead)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadCollectionElement(XmlReader reader, Object collectionOwner, IList toRead, Boolean disposeObjects)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadElementInObject(XmlReader reader, PropertyDescriptor property, Object toRead)
at Telerik.WinControls.XmlSerialization.ComponentXmlSerializer.ReadObjectElement(XmlReader reader, Object parentObject, Object toRead)
at Telerik.WinControls.PartiallyLoadableStyleSheet.Deserialize()
at Telerik.WinControls.PartiallyLoadableStyleSheet.get_PropertySettingGroups()
at Telerik.WinControls.XmlStyleSheet..ctor(StyleSheet style)
at Telerik.WinControls.StyleBuilderBase.get_BuilderData()
at Telerik.WinControls.Styles.StyleMap.BuildStyle()
at Telerik.WinControls.Styles.StyleManager.MapStylesToElementsRecursive(RadElement element)
at Telerik.WinControls.Styles.StyleManager.MapStylesToElementsRecursive(RadElement element)
at Telerik.WinControls.Styles.StyleManager.MapStylesToElementsRecursive(RadElement element)
at Telerik.WinControls.Styles.StyleManager.MapStylesToElementsRecursive(RadElement element)
at Telerik.WinControls.Styles.StyleManager.AttachStylesToElementTree()
at Telerik.WinControls.RootRadElement.ControlThemeChanged()
at Telerik.WinControls.ComponentThemableElementTree.CallControlThemeChanged()
at Telerik.WinControls.ComponentThemableElementTree.ApplyThemeToElementTree(Boolean checkInitializing)
at Telerik.WinControls.ComponentThemableElementTree.EnsureThemeAppliedInitially(Boolean checkInitializing)
at Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
at Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
at Telerik.WinControls.RadControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
答案 0 :(得分:1)
检查环境变量temp
,它可能指向一个不存在的文件夹。