Creating widgets
I'm trying to create a widget following this tutorial github.com/.../Create-a-“Hello-World”-MVC-widget-in-a-separate-assembly
Everything looks OK, the view exists in the correct folder, I applied the changes to the AssemblyInfo.cs etc.
When I hit the controller that fires this I've noticed that an Application_Error is thrown in my Global.asax file as below:
+ LastActivityDate '((System.Web.Profile.ProfileBase)(((ASP.global_asax)(sender)).Profile)).LastActivityDate' threw an exception of type 'System.ArgumentNullException' System.DateTime System.ArgumentNullException
+ LastUpdatedDate '((System.Web.Profile.ProfileBase)(((ASP.global_asax)(sender)).Profile)).LastUpdatedDate' threw an exception of type 'System.ArgumentNullException' System.DateTime System.ArgumentNullException
UserName null string
This is the error message that is rendered:
The view 'Default' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/YouiWall/Default.aspx
~/Views/YouiWall/Default.ascx
~/Views/Shared/Default.aspx
~/Views/Shared/Default.ascx
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/YouiWall/Default.aspx
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/YouiWall/Default.ascx
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/Shared/Default.aspx
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/Shared/Default.ascx
~/Views/YouiWall/Default.cshtml
~/Views/YouiWall/Default.vbhtml
~/Views/Shared/Default.cshtml
~/Views/Shared/Default.vbhtml
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/YouiWall/Default.cshtml
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/YouiWall/Default.vbhtml
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/Shared/Default.cshtml
~/Frontend-Assembly/YouiWallWidget/Mvc/Views/Shared/Default.vbhtml
Any help would be greatly appreciated.
Hi Andrew,
Thank you for the details. Could you double check if you
have marked your Default.cshtml view as embedded resource?
Also would you test if the issue is reproducible on empty
project- create empty Sitefinity project, add Feather as described here (github.com/.../Getting-Started)
and drop your new dll YouiWallWidget into the bin folder of the new
SitefinityWebApp project. Is the issue still representable on the empty site?
Regards,
Elena
Hi,
Thanks for the response, yes the view is embedded, I had some issues with getting the basic mvc routing working had a controller in a namespace that it couldn't resolve now I can get widgets working within the sitefinity project. I'm going to go with that for now.
Thanks for the response,
Andrew
Hello Andrew,
I was just wondering whether you still have the issue trying to create a widget?
Hi Elena,
I'm creating widgets OK within the SitefinityWebApp project, I still have issues with a widget in a seperate project.
Regards,
Andrew
Hello Andrew,
Could you provide me with your YouiWallWidget project so I could test the behavior on my side and investigate the problem further? Also would you please attach your Global.asax file, so I could review it as well.
Thanks in advance.
Regards,