The controller cannot be resolved.
Hello,
I've got a Sitefinity 6.0.4210 based site from my customer and he wants to upgrade it to version 7. I've downloaded from his account Project Manager and license file and upgrade went well. On first run after the uprgade Sitefinity asked me about license file and then I was able to login into the administration view. However when I try to run the main site I'm getting an exception:
ArgumentException: The controller with the name 'SitefinityWebApp.Mvc.Controllers.SomeController' cannot be resolved.]
Telerik.Sitefinity.Mvc.SitefinityControllerFactory.CreateController(RequestContext requestContext, String controllerName) +455
Telerik.Sitefinity.Mvc.Proxy.MvcProxyBase.get_Controller() +162
Telerik.Sitefinity.Mvc.Proxy.MvcProxyBase.get_Settings() +499
This is happening in every case - even if I tried different Sitefinity versions than just 7. Here are the logs after upgrade to version 6.1.4300.
Can you please advise what to do?
----------------------------------------
Timestamp: 7/16/2014 8:29:30 PM
Message: HandlingInstanceID: 2dd04bea-f233-4f8f-a379-c5b75990bfee
An exception of type 'System.Reflection.ReflectionTypeLoadException' occurred and was caught.
---------------------------------------------------------------------------------------------
07/16/2014 22:29:29
Type : System.Reflection.ReflectionTypeLoadException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source : mscorlib
Help link :
Types : System.RuntimeType[]
LoaderExceptions : System.Exception[]
Data : System.Collections.ListDictionaryInternal
TargetSite : System.RuntimeType[] GetTypes(System.Reflection.RuntimeModule)
HResult : -2146232830
Stack Trace : at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Telerik.Sitefinity.Mvc.Store.ControllerScanner.GetControllers()
at Telerik.Sitefinity.Mvc.Store.ControllerScanner.ScanControllers()
at Telerik.Sitefinity.Mvc.MvcCore.EnableMvcSupport()
at Telerik.Sitefinity.Services.SystemManager.Initialize()
Additional Info:
MachineName : WIN-0M0ICA76E04
TimeStamp : 7/16/2014 8:29:30 PM
FullName : Telerik.Sitefinity.Utilities, Version=6.1.4300.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/2/ROOT-3-130500160750076200
ThreadIdentity :
WindowsIdentity : IIS APPPOOL\DefaultAppPool
Requested URL : http://127.0.0.1/
Category: ErrorLog
Priority: 0
EventId: 9010
Severity: Warning
Title:Enterprise Library Exception Handling
Machine: WIN-0M0ICA76E04
App Domain: /LM/W3SVC/2/ROOT-3-130500160750076200
ProcessId: 3720
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:2876
Extended Properties:
Hi Tomasz,
The error states that there is a problem resolving an MVC controller on your home page. It states it is the SomeController one in the log, but in order for you to be sure, please edit the home page with the page editor. You will see the widget giving the same exception. Removing it will prevent the behavior.
In order to fix the controller I believe it best you register it again by trying both the standard approach and the MVC approach.
Regards,
Ivan D. Dimitrov
Telerik
i am having the same issue "The controller with the name 'CustomShopfront' cannot be resolved."
i have also edit the home page but there is no exception.it is working fine as it should be.
what should i do ?
Hi all,
@Chetanya,
The suggestion I provided should be relevant to your case as well. Can you confirm that you have added the following attribute at the top of your controller:
[ControllerToolboxItem(Name =
"CustomShopfront"
, Title =
"CustomShopfront"
, SectionName =
"MVC"
)]
Thanks for your reply.
problem is fixed now by registering again using standard approach.