我目前正在将一个大的 asp.net 核心解决方案拆分为多个较小的解决方案,每个解决方案都有一个应用程序。为此,基础应用程序需要指向
www.originalApp.com
并且我的每个较小的应用程序都将使用路径访问
www.originalApp.com/SplittedApp
我已经设法使用 IIS 在 applicationHost.config 中通过以下设置运行它
<site name="OriginalApp" id="3" serverAutoStart="true">
<application path="/" applicationPool="OriginalAppPool">
<virtualDirectory path="/" physicalPath="OriginalAppPath/>
</application>
<application path="/SplittedApp" applicationPool="splittedApp">
<virtualDirectory path="/" physicalPath="splittedAppPath />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:82:" />
<binding protocol="http" bindingInformation="IpAddress:originalApp" />
</bindings>
<applicationDefaults applicationPool="Fire.Frontend" />
</site>
Run Code Online (Sandbox Code Playgroud)
我已经在 IISExpress 的 applicationHost.config 文件中为这两个应用程序尝试了此设置的多种变体,但出现了不同的问题。
拆分应用程序中的我的应用程序 launchSettings.json 如下所示
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:9345/splitted app",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": …
Run Code Online (Sandbox Code Playgroud)