Reputation: 277
I'm trying to put together the following architecture:
To make things clear, here is the IIS Express configuration:
<site name="Redacted.Axis.Web.UI.SingleApp-Site" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Projects\Axis\Dev\PocInternational\Web\Redacted.Axis.Web.UI.App" />
</application>
<application path="/SPA" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Projects\Axis\Dev\PocInternational\Web\Redacted.Axis.Web.UI.SingleApp" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:4010:localhost" />
</bindings>
</site>
They are on separated web projects (UI.App and UI.SingleApp). I want them to share the same authentication. I managed to make that work already with common machine keys and same authentication/forms configuration.
My last problem is, static files under the root application are not being served, like /CSS/site.css or /JS/jquery.js. I'm getting 500.22 error for all of them.
This error is suppose to mean I should be in classic mode, but WebForms app worked fine so far in integrated mode (and default.aspx or login.aspx at root work).
It can also means that some modules defined in system.web are not in system.webServer. But they are.
I have this in both web.config files:
system.webServer/validation@validateIntegratedModeConfiguration=false
systel.webServer/modules@runAllManagedModulesForAllRequests=true
Static files for sub MVC application work fine, like /SPA/Content/sites.css.
The WebForms application worked fine before I added the virtual directory with the MVC application. Only other thing I had to change was adding location@path=.@inheritInChildApplications=false on all web.config nodes of root application so the MVC web.config works correctly.
There must a little thing off but I can't put my finger on it...
Upvotes: 0
Views: 232
Reputation: 277
Power of posting.
I started to think my location tags in root web.config had something to do with it.
I found the answer here.
For the lazies, validateIntegratedModeConfiguration has to be outside the location tag. You can have two system.webServer section, it doesn't matter (but not two validation tags).
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<location path="." inheritInChildApplications="false">
<system.webServer>...</system.webServer>
</location>
Upvotes: 1