So the scenario is: I’m taking an existing HTML/CSS website and adding a contact form using ASP.NET right. All goes well until I put it up on my server and I get this “custom errors” error in my web config file. My web config file doesn’t contain much of anything so I try to add the code in the error message (both of them) with no luck. What can I do to fix this problem and avoid it in the future?
Well i tried adding the code on the error page to my web config file and that didn’t help so turning custom errors off doesn’t seem to be an option at this point.
I talked to the people hosting the server and they say they have the latest version of ASP.NET running.
Well I’m using Visual Studio Web Dev 2010. I also found out that the servers .net framework is 2.0 - does it really make that much of a difference though?
You may be compiling for .NET 4.0 but if your server is running 2.0 then I think you’re going to have some problems. Did you reconcile why your host says they’re running the latest version if it is 2.0?
You should be able turn turn “off” custom errors and turn “on” debug through your web.config. That will give you a better idea of the problem you’re facing.
Is your web.config in the root directory of your application?
Have you tried just writing the value to the screen as opposed to actually trying to use it? (e.g. Response.Write(ConfigurationSettings.AppSettings(“[keyname]”))
I store all of my database connection strings in the web.config file and do something like this:
Well I’m not using any kind of kind of database connections. And my server is running 2.0 - which is ridiculously hard to develop for I’ve come to realize. . .