每次启动ASP.NET Core MVC应用程序时出现IIS错误
问题描述:
我在使用新的ASP.NET Core MVC时遇到了问题。我制作一个空的项目或使用Web应用程序模板。我每次更改保存在Visual Studio 2015年的文件浏览器或我每次启动应用程序有或没有调试时间任何文件,IIS错误弹出:每次启动ASP.NET Core MVC应用程序时出现IIS错误
"Unhandled exception has occurred in your application: The directory name C:\Users\COMPUTERNAME=ZENBOOK is invalid".
什么可能这个路径是什么?在任何可能触发此类事件的设置中都不会更改任何内容。
错误的其余部分:
************** 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类似的问题。
我觉得它可能与环境变量有关,但我检查,他们似乎很好。任何想法都表示赞赏。
答
“Zenbook”用户名对您有意义吗?是你吗?
另外,您的堆栈跟踪在执行Windows窗体代码时描述了一个问题。你有什么理由要使用这些吗? 检查你的设计是没有意义的,至少对于不知道你的应用程序做什么的人来说。
“Zenbook”只是机器的名称,这就是我,是的。 它只是任何默认的Web应用程序模板。所以,这是一个web应用程序项目,并不真正知道WinForms是如何参与的...... – telegrammae
好吧,它有点难以说我没有真正看到它,但我建议你尝试找到该代码。从查看dll或安装的nugent包开始。 –
**************例外文本************** System.IO.IOException:目录名称无效。 在System.IO .__ Error.WinIOError(的Int32的errorCode,字符串maybeFullPath) 在System.IO .__ Error.WinIOError() 在System.IO.Path.InternalGetTempFileName(布尔checkHost) ...... – telegrammae