Do you get any 500 error message back from the server? (usually there is an error in the view). Try running it with the console open or using a proxy tool like Fiddler.
Frederik
I'm getting these errors in the console:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Web.Mvc.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Web.Mvc.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Web.Mvc.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Web.dll
A first chance exception of type 'Microsoft.Samples.Runtime.Remoting.Channels.Pipe.PipeIOException' occurred in EPiServer.Scheduler.dll
The thread 'PipeServerChannel.ServerMain' (0x674) has exited with code 0 (0x0).
No 500 error as far as I can see.
I've tried to strip the View so currently nothing is going on there. But the error still occurs...
EDIT: There's actually an 500 error and it seems that it can find the view (Index). I created it as a partial view as described in the article I linked in my intial post. But maybe there's something wrong there anyway...:)
Could you double-check using Fiddler? In my experience Chrome's console window doesn't always show all errors (while Firefox's is better).
You could also enable compilation of your views during build to see if you get any build errors.
Frederik
Ok, great. You should be able to see the stack trace in the 500 response. Good luck.
Frederik
Hmmm this obiously goes beyond my understanding. This is the exception:
Exception Details: System.InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
/modules/TSSocialMediaStats/Views/SocialMediaStats/Index.aspx
/modules/TSSocialMediaStats/Views/Shared/Index.aspx
/modules/TSSocialMediaStats/Views/SocialMediaStats/Index.ascx
/modules/TSSocialMediaStats/Views/Shared/Index.ascx
~/Views/SocialMediaStats/Index.aspx
~/Views/SocialMediaStats/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/SocialMediaStats/Index.cshtml
~/Views/SocialMediaStats/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
The View IS in ~/Views/SocialMediaStats/Index.ascx. Setting the build action for the View to "Embedded Resource" doesn't help.
Do you have a viewstart.cshtml defined somewhere? Try adding:
@{
Layout = null;
}
To your view.
Frederik
Ok. some steps forward :)
As described in the article I created a separate project for my Dashboard gadget and pointed the location for this project to: MyWebsiteFolder\Public. Building and running still gives the error described above. BUT! If I manually copy(!) my View (MyWebsiteFolder\Public\Views\SocialMediaStats\Index.cshtml) to MyWebsiteFolder\Views\SocialMediaStats\Index.cshtml everything runs OK.
However, I presume that this can not be the preffered way of doing this? Am I missing some step or have I misinterpreted the instructions given in the article?
Hi,
I'm developing a dashboardgadget for EPiServer 7 but have run in to problems when trying to return a list to the default View (Index) as described in: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-Framework/7/OnlineCenter/Developing-Gadgets/
Returning content works fine:
but when trying for exampel:
The dashboard gadget only displays: "Sorry, an error occurred". The problem remains the same trying any type of combination of returning empty Views, typed View vs. non-typed View etc. Any ideas?