【问题标题】:IIS error with every launch of an ASP.NET Core MVC app每次启动 ASP.NET Core MVC 应用程序时出现 IIS 错误
【发布时间】: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


    【解决方案1】:

    “Zenbook”用户名对您有意义吗?是你吗?

    此外,您的堆栈跟踪描述了执行 Windows 窗体代码时的问题。你有什么理由使用其中的任何一个吗? 检查您的设计,因为这没有意义,至少对于不了解您的应用程序功能的人来说是这样。

    【讨论】:

    • "Zenbook" 只是机器的名称,没错,就是我。它只是任何默认的 Web 应用程序模板。所以,是个web app项目,真不知道WinForms是怎么参与的……
    • 好吧,如果没有实际看到它,我很难说,但我建议您尝试找到该代码。从查看 dll 或已安装的 nugent 包开始。
    • ************** 异常文本 ************** System.IO.IOException:目录名称无效。在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.__Error.WinIOError() 在 System.IO.Path.InternalGetTempFileName(Boolean checkHost) ...
    • 这就是 IIS 显示的内容,如果我尝试查看它的所有进程...如何跟踪这段代码?
    猜你喜欢
    • 2021-12-13
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 2018-04-18
    • 2017-05-22
    • 1970-01-01
    • 2020-09-07
    • 1970-01-01
    相关资源
    最近更新 更多