First of all, that guide is very old - for umb 4.7. Some things may by the same, but I really don't see what the guide tries to solve.
By adding your application in virtual directory, you run into alot of configuration issues that you must be aware of. I would suggest not doing this.
Normally I would just create a new controller in the website, and put your custom code into that. It's not uncommon to have a controller for each documenttype, thus allowing you to have custom code on all pages. This would also make it possible for your editors to create the type of pages that contain your custom code - be it a form, product-listings etc.
As per fixing your issue at hand, you would need to provide some more code.
Null Context exception was throw
Hello all,
I followed this article: http://scottsdevblog.com/2011/07/adding-an-mvc-or-other-net-application-in-umbraco-cms-4-7/
In my solution is: Umbraco 7.10 and MVC Application as bellow URL Umbraco: http://orgin.local MVC App: http://http://orgin.local/Origin
here is my IIS configuration:
My problem is when I start to localize the text using Umbraco API or inherit my page to @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
The site will throw exception
Please tell me how could I fix it? Do I need to create a Fake UmbracoContext? If possible please give me solution code
Many thank you for your help Quách
hi,
First of all, that guide is very old - for umb 4.7. Some things may by the same, but I really don't see what the guide tries to solve.
By adding your application in virtual directory, you run into alot of configuration issues that you must be aware of. I would suggest not doing this.
Normally I would just create a new controller in the website, and put your custom code into that. It's not uncommon to have a controller for each documenttype, thus allowing you to have custom code on all pages. This would also make it possible for your editors to create the type of pages that contain your custom code - be it a form, product-listings etc.
As per fixing your issue at hand, you would need to provide some more code.
Could you help me?
Hello @Søren Gregersen,
Thanks for your reply my question, the reason to make a virtual directory that we want to separate an MVC application outside Umbraco project;
The Umbraco project is only for configuration and and MVC project is calling umbraco API to get that configuration/localize (translate text)
Do you have any other idea?
Thanks
is working on a reply...