One Solution for "Cannot Find Server or DNS Error"

  • Thread starter Thread starter Mike Hofer
  • Start date Start date
M

Mike Hofer

In my ASP.NET application, *one* page would not render in the
application. All others would show up just fine, but when the user
clicked the button to browse to this one page, I'd get a nasty error
message from IE: "Cannot find server or DNS error."

I set some break points and determined that the page was being loaded,
but that the error page was being displayed anyway. Fortunately, I'm
pretty obsessive about logging errors (both in my database and in the
event log). A little research revealed that I had changed the names of
a couple of controls and hand't updated their validators accordingly.

ASP.NET doesn't bind validators to their target controls until runtime,
which is kind of annoying. If the controls don't exist, you'll get that
spiffy error message I described above.

So double-check your ControlToValidate and ControlToCompare properties.


I hope this saves someone lots of frustration.

Happy coding.
 
A better solution would be to ensure that propper error messages were
rendered to the browser whilst you are still developing the site, you only
want IEs "freindly" error messages on a live enviroment.

If you had errors and debugging turned on it would have told you what the
problem was at compile time.
 
clickon said:
A better solution would be to ensure that propper error messages were
rendered to the browser whilst you are still developing the site, you only
want IEs "freindly" error messages on a live enviroment.

If you had errors and debugging turned on it would have told you what the
problem was at compile time.

Perhaps I failed to point out the fact that I *did*, in fact have those
messages enabled, as is my standard practice, and that this still
occured.

Thanks for the helpful advice anyway.
 
Back
Top