System.IO.FileNotFoundException.C:\\Windows\TEMP\目录读取错误,在visual studio中调试ASP.NET项目时发生错误。在visual studio中调试ASP.NET项目时,读取C:\Windows\TEMP/目录时发生错误。

问题描述 投票:1回答:2

在调试项目时,Visual studio出现了一些错误,当我试图在数据库文件(.mdf扩展名)中添加一个表时,VisualStudio自动重启,错误列表--&gt。

    System.IO.FileNotFoundException: Error reading the C:\Windows\TEMP\ directory.
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.IisExpress.SysTray.TrayAppHiddenForm.TrayAppHiddenForm_Load(Object sender,    EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   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 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)

请帮助我解决这个错误。

visual-studio-2012
2个回答
0
投票

嘿,它也发生在我身上,问题解决了,当我去目录C:\\Windows\TEMP和系统问我访问这个文件夹,我点击是,所以当前用户有权利在该文件夹和错误消失。这是我的windows UPDATE后的访问权限问题。


-1
投票

这篇博文绝对解决了我们面临的问题(这将描述我们面临的问题)。- http:/devatheart.azurewebsites.net20110418troubleshooting-xmlserializer-failure。

我们有这样一段代码

System.Diagnostics.Process.Start(RetrievedURL);这是在点击按钮和打开网页时在后台生成IE进程(因为IE是webserver上的默认浏览器)。

这并不是一件明智的事情,但我们删除了这段代码,它确实阻止了后台的IE进程。

它是如何与XML序列化失败联系起来的,在上面的帖子中已经解释过了。感谢Slobodan Stipic,又名Slobo的研究和这篇博文。

希望这个解决方案能帮助到大家。

© www.soinside.com 2019 - 2024. All rights reserved.