Im currently splitting a big asp.net core solution into multiple smaller solutions, each with a single app.
In order to do this, the base app needs to point at
www.originalApp.com
and each of my smaller apps will be accessed using the path
www.originalApp.com/SplittedApp
I have managed to get this running using IIS with the following setup in the 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>
I have tried multiple variations of this setup in the applicationHost.config files for IISExpress for these 2 apps with different problems coming up.
my app launchSettings.json in the splitted app looks like this
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:9345/splitted app",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
and the original app
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:9345",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
the current setup fails to load the second app because the same port is in use, however i need to use the same port so i can then append the path and effectively navidate the pages between the 2 applications.
I find it hard to believe that what im trying to achieve is not possible using IIS Express since it works fine with IIS.
Ive read a lot of post on SO and blogs over the web but i cant find anyone with the same issue and none of the solutions to issues that seemed similar worked for me, so if anyone can point me in the right direction it would be most appreciated.
Thanks.
PS
im not sure about the tags i added in the question are correct so let me know if there are better tags to add.
See Question&Answers more detail:
os