One Solution for "Cannot Find Server or DNS Error"

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.
 
G

Guest

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.
 
M

Mike Hofer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top