4

So I have created my Controller Rendering, that uses controller

Sitecore.Social.Twitter.Client.Mvc.Areas.Social.Controllers.TwitterConnectorController

like so:

enter image description here

But when I try to access the page, I get an error complaining about the Controller not being controller enough:

enter image description here

But if I inspect the dll with the Object Viewer, the controller in question indeed inherits from IController:

enter image description here

So, what is going on here? Why am I receiving this error?

EDIT: I suspect that perhaps the error message is merely a symptom, and Sitecore is somehow unable to access the controller in the DLL. What factors could cause this behavior, and how can I debug them?

Emanuele Ciriachi
  • 2,216
  • 2
  • 26
  • 39
  • Make sure that you don't use some custom inversion of control container which requires your controllers to be registered. – Anton Apr 14 '16 at 14:14
  • 1
    @Emanuele, did you find a resolution for this? I am investigating the same thing. – MikeD Jan 27 '17 at 19:29
  • Same here appreciate it if someone tackled this let us know. thanks – Jay Oct 20 '17 at 09:21

3 Answers3

3

This link worked for me: http://jockstothecore.com/adventures-in-dependency-injection/

Basically fully qualified controller names bug out the system. I updated mine to use the class name (minus the "controller" word) and proper action and it solved my issue.

MikeD
  • 251
  • 2
  • 10
1

I checked TwitterConnectorController and I don't see any connection between /ajax/sociallogin and TwitterConnectorController

Please search for sociallogin controller and check if is inherits from from SitecoreController

Vlad Iobagiu
  • 4,118
  • 3
  • 13
  • 22
  • Hi, you don't see it because it's a connection I made myself - I didn't took a screenshot before as that's a part that I am confident about, however here it is: http://i.imgur.com/2i8NRUs.png – Emanuele Ciriachi Apr 14 '16 at 14:17
  • 1
    Can you remove other renderings and add just that Twitter controller. – Vlad Iobagiu Apr 14 '16 at 14:20
  • I tried it - I am now no longer receiving the error, but nothing seems to happen at all. Is there any way I can check whether a method inside a DLL was called? – Emanuele Ciriachi Apr 15 '16 at 19:37
0

When I turned current framework of project to

.NET Framework 4.6.1

previously scaffolding was also not working and it started to work.

Charlie
  • 4,827
  • 2
  • 31
  • 55