【发布时间】:2016-08-11 19:03:28
【问题描述】:
我在使用新的 ASP.NET Core MVC 时遇到问题。我创建了一个空项目或使用 Web 应用程序模板。每次我在 Visual Studio 2015 文件浏览器中保存对任何文件的更改或每次启动应用程序(无论是否调试)时,都会弹出一个 IIS 错误:
“您的应用程序中发生了未处理的异常:目录 名称 C:\Users\COMPUTERNAME=ZENBOOK 无效”。
这条路可能是什么?从未更改任何可能触发此类事情的设置中的任何内容。
其余的错误:
************** Exception Text **************
System.ArgumentException: The directory name C:\Users\vouCOMPUTERNAME=ZENBOOK\ is invalid.
at System.IO.FileSystemWatcher.set_Path(String 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.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)
任何刷新都可以很好地呈现该站点。但是这个错误不断出现 - 在两台不同的机器上。但是,MVC 4 项目永远不会发生这种情况……但是,我的朋友在使用 ASP.NET Core MVC 时没有任何类似的问题。
我觉得这可能与环境变量有关,但我检查了一下,它们似乎没问题。任何想法表示赞赏。
【问题讨论】:
标签: c# asp.net asp.net-mvc iis