acentoespanol Posted June 13, 2013 Posted June 13, 2013 Hi everyone, I've created a blog in asp.net (c#) and the past two days have been nothing but headaches trying to figure out how to get it up and working properly. No matter what I do, every page turns up a generic error: Server Error in '/' Application Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration> I have added the requested <customErrors mode="Off" /> tag to the config file, but it still doesn't show any details about the error. I've tried changing/taking out dozens of different parts of my code files to try and manually figure out what's wrong, but it still shows that page no matter what. (And I've cleared my cache every time etc. etc.) I've googled the problem extensively, but still can't figure out how to even make it show what's wrong!! Note: the application's target framework is 4.0. When I noticed that the support was only for 3.5 on this host, I changed it to 3.5 but with no different results. I even tried to upload a simple one page asp.net project with nothing but the text "hello world" on it, and it showed the exact same page. Please help!My domain is acento-espanol.com (it's on the johnny server)
Krydos Posted June 13, 2013 Posted June 13, 2013 Try this web.config to show error messages: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>
acentoespanol Posted June 13, 2013 Author Posted June 13, 2013 Just tried that, still shows the same thing
acentoespanol Posted June 14, 2013 Author Posted June 14, 2013 Woah, my test website suddenly started working, so I tried reuploading my main blog. Thankfully I'm starting to get somewhere, but I'm still not quite sure what to do. It's now giving me more info about the problem, it's an Error 500, then says:Unrecognized attribute 'targetFramework'. (/home/acento/public_html/Web.config line 1)I went into my config file, where it says <compilation debug="true" targetFramework="4.0" /> and removed the targetFramework attribute completely, but it still shows the same error...any suggestions?
DeepBlue42 Posted July 5, 2013 Posted July 5, 2013 i had the same issue (although my site is still not working, but at least it successfully debugs). You have to re-create your project. In the project creation dialog, select v3.5 from the drop down list at the top. It is very important you do this at the creation of the project, because simply downgrading the framework in the properties dialog doesn't work (I don't know why). When the target framework is set correct, you will get another web.config file, without that attribute. In my situation, i could then debug the project successfully (local), but unfortunately my site is not working. I keep having the same error as you started this thread with, how did you solve that one?
acentoespanol Posted August 2, 2013 Author Posted August 2, 2013 Hi DeepBlue Lol my bugs have progressed to now I THINK my config file is okay (changing to 3.5 in the dialog box did actually work, I just had to manually delete a ton of crap in the config file that it created) now all I get though is an error 500, and it aays that "Object reference not set to an instance of an objectAt first when I checked the error log, it said that I was missing 404.shtml and robots.txt, I created a 404 and a blank txt named robots, but the page still gives the error (only now nothing shows up in the log). I have been wondering though, I have an sql database, is it possibly not connecting properly to that? It worked fine locally, but the connection strings in the config just seem like there should be something else...(first time I've ever worked with sql though, so I don't know.)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now