I have created an application in ASP.NET MVC4 and hosted my application in IIS 7.5. I am noticing a wierd issue when I try perform an action in jqgrid which throws an exception from the server but it just displayed as “Error” in the jqgrid.
In the controller action, in the catch block, I am throwing a message which I want to display, which works just fine in my machine but when I try to connect to the server(my machine) from another machine using //machine-name/virtual-directory-name/, I am just getting “Error” displayed.
I am really suspicious that some setting in my virtual directory is causing this issue. Is there anything that I should change in the virtual directory settings to make this work.
I currently have
Anonymous Authentication - Enabled (Application Pool Identity)
ASP.NET Impersonation - Enabled
Windows Authenticaiton - Enabled
Please help, thanks for any suggestions.
After struggling for a while, I figured out what the problem was and how to fix the issue. As I suspected, the problem is pertinent to web.config settings which can be resolved by adding an additional tag to the web.config file.
In web.config, add the following tag to the
<system.web>tag.There are three modes; On, Off and RemoteOnly. Setting it to Off will enable us to display ASP.NET specific detailed errors. RemoteOnly is recommended for security reasons in case by mistake you don’t display application specific errors to remote clients.
Hope this helps someone so that they don’t have to bang their head on their system.