Home > Articles > IIS Articles > Fix to : Custom Error Page While Accessing ASP.NET Site Remotely From Server

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

by Karthik Sachin   on Jul 26, 2016   Category: IIS  | Level: Beginner  |  Views: 694    |  Points: 100   
Like this article? Bookmark and Share:
In this blog, you will learn how to Show Custom Error Page While Accessing ASP.NET Site Remotely from Server.

Introduction

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

Background

A few days back, I hosted my asp.net application in 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 the same with other beginners like me.

Screenshot of the Error



Reason for the Error

When you access the page from server machine (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/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 was useful when developers get the error like above for the first time and understand the root cause of the problem.



Like this article? Bookmark and Share:

Most viewed Articles

User Comments


No response found, be the first to review this article.

Submit feedback about this article

Please sign in to post feedback

Latest Posts