我的目标是在VM内封装仅Windows的旧版asp.net应用程序,从(非Windows)主机安装源文件夹,并使用VM生成和运行该应用程序以减轻迁移的麻烦。 / p>
我的主机正在运行MacOS
我的客人正在运行Windows 10
我正在使用VirtualBox的共享文件夹将源文件夹从主机共享到来宾。这将使用SMB协议,将指定的文件夹安装为Windows中的映射网络驱动器。
旧版应用程序是用.net 4.7编写的
从本质上讲,这是一个超重的应用程序“容器”。
尝试从共享文件夹运行IISexpress时,出现以下错误:
The application pool was not found in the configuration file.
我正在运行的命令是
"C:\Program Files\IIS Express\iisexpress.exe" /config:N:\src\applicationhost.config /trace:errorenv /apppool:Clr4IntegratedAppPool
applicationhost.config
指定
<applicationPools>
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
和
<site name="Application" id="10">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="N:\src\Application" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:44301:" />
<binding protocol="https" bindingInformation="*:44300:" />
</bindings>
</site>
从来宾VM内的本地C驱动器运行(适当修改了路径)时,应用程序启动没有问题。仅当从共享文件夹中运行时,才会出现问题。