Step 1: Add below to sytem.web section in web.config file :
<system.web> <customErrors defaultRedirect="~/Error/500.aspx" mode="RemoteOnly" redirectMode="ResponseRewrite"> <error statusCode="500" redirect="~/Error/500.aspx"/> </customErrors> </system.web>
Above code deals with asp.net runtime errors. Make sure it is a .aspx extension but not .html as IIS has some issue dealing with .html extensions on 500 errors.
Step 2: Add below to sytem.webServer section in web.config :
<system.webServer> <httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto"> <remove statusCode="500" subStatusCode="-1"/> <error statusCode="500" path="~/Error/500.html" responseMode="File"/> </httpErrors> </system.webServer>
Above code deals with any IIS errors.
Now add 500.html and 500.aspx to your build according to your project requirements.
Please let me know if u have any questions about this, i will come back as soon as i can.
The model item passed into the dictionary is of type Sitecore Mvc Presentation RenderingModel, but this dictionary requires a model item of type xxx
You might have come to this page as you encoutered same error as mine. I am using Glassmapper as ORM for sitecore.
There are many reasons for this error. Below are couple of them.
- Make sure you are passing in right datsource template for your rendering. If your rendering is not expecting any datasource make sure u have datasource field empty on presentation.
- If you are in multi-lingual environment, make sure all the items needed by the rendering have this language version, Using language fallback helps in this
- Rendering Parameters