Virtual Directory MVC App - "Could not load file or assembly 'Umbraco.ModelsBuilder'"
I'm trying to deploy a custom, pure ASP.NET MVC app in a Virtual Directory under the Umbraco site root. I've added the virtual directory to umbracoReservedPaths.
However I just keep getting the following YSOD error:
Could not load file or assembly 'Umbraco.ModelsBuilder' or one of its dependencies. The system cannot find the file specified.
The Umbraco site itself works fine, and there are no dependencies on anything Umbraco-related in the MVC app -- in fact I've tried this with a brand new, default MVC app.
I also tried <remove assembly="Umbraco.ModelsBuilder" /> and this actually eliminated the message, but then I got the same error about another assembly -- Imazen.SlimResponse -- which is also not referenced by the Virtual Directory app, and adding the <remove> directive for this one did NOT help.
What's going on here??
EDIT: Technically within IIS this is an "Application" not just a "Virtual Directory".
I found your post as I was getting the same error. For me the child application was taking on the configuration from the main web.config which was for the Umbraco site root.
For me I just wanted to access the application without any Umbraco dependencies and added <clear/> to my DemoApp's 'web.config' file beneath the <configSections> tag and this resolved the YSOD.
Also it didn't have any effect meantime but would be good to read about the UmbracoReservedPaths key in the Umbraco web.config, I believe your demo app directory should be added here but would need to read up again to find exactly why.
Virtual Directory MVC App - "Could not load file or assembly 'Umbraco.ModelsBuilder'"
I'm trying to deploy a custom, pure ASP.NET MVC app in a Virtual Directory under the Umbraco site root. I've added the virtual directory to
umbracoReservedPaths
.However I just keep getting the following YSOD error:
The Umbraco site itself works fine, and there are no dependencies on anything Umbraco-related in the MVC app -- in fact I've tried this with a brand new, default MVC app.
I also tried
<remove assembly="Umbraco.ModelsBuilder" />
and this actually eliminated the message, but then I got the same error about another assembly --Imazen.SlimResponse
-- which is also not referenced by the Virtual Directory app, and adding the<remove>
directive for this one did NOT help.What's going on here??
EDIT: Technically within IIS this is an "Application" not just a "Virtual Directory".
Update:
I've now also tried this from scratch to eliminate as many variables as possible. Here are the repro steps:
umbraco-demo.local
http://umbraco-demo.local
and ran the Umbraco installerNOTE: So far everything works as expected. I can log into the back office or browse the new Umbraco site..
umbracoReservedPaths
setting in Umbraco's web.confighttp://umbraco-demo.local/DemoApp
Again I get the error:
Additional info:
I don't think this is specifically related to ModelsBuilder. Just to see what would happen, I added this to my "DemoApp" web.config:
Now the error message says:
So naturally, I tried adding:
But this had no impact, the error remained.
Hi Brian,
I found your post as I was getting the same error. For me the child application was taking on the configuration from the main web.config which was for the Umbraco site root.
I found information on this stackoverflow post here - http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic#answer-782277
For me I just wanted to access the application without any Umbraco dependencies and added
<clear/>
to my DemoApp's 'web.config' file beneath the<configSections>
tag and this resolved the YSOD.Also it didn't have any effect meantime but would be good to read about the
UmbracoReservedPaths
key in the Umbraco web.config, I believe your demo app directory should be added here but would need to read up again to find exactly why.Hope this helps.
After several hours I finally got this to work with a nested MVC application. I added the path to the umbracoReservedPaths, in the parent application.
Added the following to the nested MVC web.config, not touching parent web.config.
Hope this helps someone else that is trying to do the same thing.
is working on a reply...