Over a million developers have joined DZone.

Custom Error Page While Accessing ASP.NET Site Remotely From Server

DZone's Guide to

Custom Error Page While Accessing ASP.NET Site Remotely From Server

How to resolve a weird server error with ASP.NET on Windows Server 2012.

· Web Dev Zone ·
Free Resource

Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.


In this blog, I am going to show you how to show the default error page when accessing an ASP.NET site remotely from the server.


A few days ago, I hosted my ASP.NET application on Windows Server 2012 r2 and tried to access it from the remote machine, but surprisingly I got the following error, which I didn't get locally. When I debugged it, I learned some new thing in IIS so I  just thought to share my knowledge with other beginners like me.

Screenshot of the Error

Reason for the Error

When you access the page from the server (remote machine), IIS assumes that you could handle the error by yourself and it won't show the default error pages to US.

How to Resolve This Error

Resolving this error will be very easy, you just need to add one line of code in the Web config file as follows:

This tells the IIS that we didn't handle or provide any custom page for the error, so you could provide the default error pages which are already configured by default like below:

I hope the above information is useful for when developers get the error like above for the first time and understand the root cause of the problem.

Take a look at an Indigo.Design sample application to learn more about how apps are created with design to code software.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}