[英]ASP.net Visual Studio 2019 project won't load because IIS Express cannot read configuration file on mapped network drive
I have an ASP.NET Web Application (.NET Framework) that was created in the default location of C:\Users\mcarr\source\repos\ It loads fine from this location.我有一个在 C:\Users\mcarr\source\repos\ 的默认位置创建的 ASP.NET Web 应用程序(.NET Framework)。 I was asked by my manager to keep projects out on a mapped network drive.我的经理要求我将项目保留在映射的网络驱动器上。 So I created the source and repos folders on the mapped drive and copied the entire project to the new location.因此,我在映射驱动器上创建了源文件夹和 repos 文件夹,并将整个项目复制到新位置。 It won't load from here.它不会从这里加载。 I get an error message stating that the creation of the virtual directory https://localhost:XXXXX/ failed.我收到一条错误消息,指出创建虚拟目录 https://localhost:XXXXX/ 失败。 Cannot read configuration file.无法读取配置文件。 You will need to manually create this virtual directory in IIS before you can open this project.您需要在 IIS 中手动创建此虚拟目录,然后才能打开此项目。 I have researched with no luck...我研究过没有运气...
Cannot read configuration file due to insufficient permissions 由于权限不足,无法读取配置文件
Visual Studio - Cannot Read Configuration File Visual Studio - 无法读取配置文件
I did try the suggestion of removing the URL from IISUrl in the project file.我确实尝试了从项目文件中的 IISUrl 中删除 URL 的建议。 Thinking that it may be some other configuration file, I even created another new project in VS2019 and changed the location to the repos directory on the mapped drive from the Configure your new project window of VS2019, and saved the newly created project directly there.考虑到可能是其他配置文件,我什至在VS2019中新建了一个新项目,并将位置从VS2019的Configure your new project window更改为映射驱动器上的repos目录,并将新创建的项目直接保存在那里。 Even this new test project, created in place, gives the same error message.即使是就地创建的这个新测试项目,也会给出相同的错误消息。 Any ideas?有任何想法吗?
Full environmental disclosure:全面环境披露:
VisualStudio 2019 Enterprise with Jetbrains Resharper installed.安装了 Jetbrains Resharper 的 VisualStudio 2019 Enterprise。
64-bit Windows 10 Version 21H2 Build 19044.1826 64 位 Windows 10 版本 21H2 内部版本 19044.1826
Open Enterprise Server (OES) network.开放式企业服务器 (OES) 网络。 (Used to be known as Novell) (I suspect this is the root of the problem) (以前称为 Novell)(我怀疑这是问题的根源)
Turns out that OES and Windows don't play well together.事实证明,OES 和 Windows 不能很好地配合使用。 I have several mapped drives available for me to store projects on.我有几个映射驱动器可供我存储项目。 Some are on OES servers and others are on Windows servers.有些在 OES 服务器上,有些在 Windows 服务器上。 A help desk guy told me that when copying files from an OES drive to a Windows box he has to put them in C:\temp first, then move them from the temp folder to the desired folder.一位帮助台人员告诉我,将文件从 OES 驱动器复制到 Windows 盒子时,他必须先将它们放入 C:\temp,然后将它们从临时文件夹移动到所需的文件夹。 Windows doesn't trust files from an OES share. Windows 不信任来自 OES 共享的文件。
So I moved my project to a mapped drive on a Windows box and the IIS Express error is gone.所以我将我的项目移动到 Windows 盒子上的映射驱动器上,并且 IIS Express 错误消失了。
I'm a programmer, not a network admin, and this was new to me.我是一名程序员,而不是网络管理员,这对我来说是新的。
But, problem solved.但是,问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.