they are talking about my controller is being executed twice and it happens sometimes with code files in the App_Code folder. I have my controller put in that App_Code folder
Peter Flannery says:
-"I moved it to the root of an MVC area and it seems to be working fine now. thanks for you help."
But how do you move or set up an area for these MVC controllers?
Maybee I shouldnt set up a new area but use the one in there for Umbraco and MVC. Were is that area being found?
I have resorted to setup a new development enviroment to sovle my problem. Now I am first creating a MVC 4 project in my Visual Studio and then importing manually all files from my previous dev location. DB I still use a MS SQL fullversion.
No my question: Is there no way to develop open source code and MVC? MVC has to be inside a dll to work properly? The App_Code was great so that I could modify current enviroments and always leave documented what has been change or done.
I solved this problem by renaming the route (the first argument in RouteTable.Routes.MapHttpRoute) in my code from "DefaultApi" to something more unique.
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
RouteTable.Routes.MapHttpRoute(
"DefaultApi",
"Umbraco/api/{controller}/{id}",
defaults: new { id = System.Web.Http.RouteParameter.Optional }
); ...
Error:A route named 'umbraco-surface-UmbProfile' is already in the route collection. Route names must be unique.
Server Error in '/' Application.
A route named 'umbraco-surface-UmbProfile' is already in the route collection. Route names must be unique.
Parameter name: name
This one beats me. I am programming MVC in Umbraco 6.1.2 and first time the page is viewing it is showing correct when reloading the page this shows?
I have found something that suggest a solution here: http://issues.umbraco.org/issue/U4-5017
they are talking about my controller is being executed twice and it happens sometimes with code files in the App_Code folder. I have my controller put in that App_Code folder
Peter Flannery says:
-"I moved it to the root of an MVC area and it seems to be working fine now. thanks for you help."
But how do you move or set up an area for these MVC controllers?
Maybee I shouldnt set up a new area but use the one in there for Umbraco and MVC. Were is that area being found?
I have resorted to setup a new development enviroment to sovle my problem. Now I am first creating a MVC 4 project in my Visual Studio and then importing manually all files from my previous dev location. DB I still use a MS SQL fullversion.
No my question: Is there no way to develop open source code and MVC? MVC has to be inside a dll to work properly? The App_Code was great so that I could modify current enviroments and always leave documented what has been change or done.
I solved this problem by renaming the route (the first argument in RouteTable.Routes.MapHttpRoute) in my code from "DefaultApi" to something more unique.
is working on a reply...