ASP.NET - Getting error in Release mode - Asked By Naresh Kumar on 09-Dec-11 05:25 AM

Hi

I have an ASP.NET  application in which run fine in "Debug" mode, but I am getting the error "Internet cannot display the page" when running the application in "Release" mode.

I am able to see loading iFrame.dll on the internet explorer tab and then the above error is coming.

Please help me in  this..Thanks in Advance.
Jitendra Faye replied to Naresh Kumar on 09-Dec-11 05:31 AM

It seems that it is a filesystem website which means the asp.net webserver will serve the site instead of IIS, becuase of that you have to run the VS when you want to use the website in order to run the webserver.

filesystem website will  autogenerate ports for your website so if you tried to open some page without running the websever "VS" then there will be no webserver to serve your website port sot that the IE will say to you that I can not display the page.

Anoop S replied to Naresh Kumar on 09-Dec-11 06:23 AM

You might want to check the following;

  • Website has been created in IIS
  • Website is running correct version of .Net
  • There are only websites of the same .Net version in each application pool
  • The site can run scripts

I prefer to change VS to use the local IIS rather than the built in web server which usually runs on a different port and you have less control over it.

Web Star replied to Naresh Kumar on 09-Dec-11 06:31 AM
When you use Windows Internet Explorer to view a Web site, you receive an error message that resembles the following: It has lots of cause so you need to check all of these
Here is microsoft giving resolution for that
http://support.microsoft.com/kb/956196
dipa ahuja replied to Naresh Kumar on 09-Dec-11 06:31 AM

The Simple Fix - Install IE 9 RC

Internet Explorer 9 RC fixes this bug, so if you had tried IE 9 Beta and stopped using it due to problems with ASP.NET development, install the RC.

The Workaround in IE 9 Beta

If you're stuck on IE 9 Beta for some reason, you can follow http://www.sadev.co.za/content/internet-explorer-9-breaks-localhost, which involves a one character edit to your hosts file. I've been using it for months, and it works great.

  1. Open notepad (running as administrator) and edit the hosts file (found in %systemroot%\system32\drivers\etc)
  2. Remove the # comment character before the line starting with 127.0.0.1
  3. Save the file - if you have problems saving, it's probably because you weren't running as administrator

When you're done, your hosts file will end with the following lines (assuming you were using a default hosts file setup beforehand):

# localhost name resolution is handled within DNS itself. 
    127.0.0.1     localhost 
#    ::1       localhost 

http://weblogs.asp.net/jgalloway/archive/2011/02/22/ie9-rc-fixed-the-internet-explorer-cannot-display-the-webpage-error-when-running-an-asp-net-application-in-visual-studio.aspx