Throwing Exception Message Giving Internal Server Error HTTP Code 500 On Live Site
Oct 4, 2010
using vb.net/asp.net 2005
when a user enters a bad email I am doing a check on this and throwing an exception message as follows, this works fine on the test site but for some reason the same code on the live site gives a "internal server error" (http code 500). The code below:
I have just installed IIS manager version 6.1 build 7600 and visual studio 2010 (latest additions of both).
I have followed all the instructions and given the correct permisions ect for IIS to work with my directory. I have a helloworld website that has worked via the localhost server many times, but almost hourly something happens to the settings in IIS and it starts throwing errors.
The current error copied below. Basically I am wondering a few things...
1. Why does my IIS constantly do something so that it works one minute and then it wont the next (this is with an identical helloworld.htm file so I know it is not something I am doing with the file that is messing it up).
HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:WindowsMicrosoft.NETFrameworkv4.0.30128aspnet_filter.dll" failed Module IIS Web Core [code]......
I am currently trying to setup our website on a windows 2008 R2 64bit machine without much success. When I try to run the website I get the error detailed below. This only happens when I run the site under .NET 4. It works when I run it under .NET 2.
I have also tried going to a test aspx page to see what happens and it also give me the same error so it is obviously something to do with .NET 4 or the way I have it set up. I am thinking it might be a permissions thing but I am not sure what permissions should be set where. Please note this is the full version of .NET 4. The error I keep getting is:
HTTP Error 500.0 - Internal Server Error
An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.Detailed Error Information
Most likely causes: The module could not be found.IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application. The authenticated user does not have permission to use this DLL.
The code in the test.aspx is <%@ Page language="vb" %> <html> <body> [code]....
the same application is working fine in 32 bit machine of my colleague where as in my 64 bit machine I am getting the following error. I also tried by changing Target Platform of the web app, under Properties-->Build-->Platform Target: From X86 to X64, in fact I tried all 3.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information:
More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
I have an asp.net application with separate classes for business logic and database interaction and then of course the UI. I am building a form to add a widget to a widget list table in the database. My UI collects the information and submits it to the business class. I'm going to write the business class to first double check that the widget has a name (I know I should do this in UI with validation, and I will, but this is just in case validation is forgotten) and if it does, go ahead and send the information to the database class. The database class will then attempt to write the info to the correct table using a try catch finally block. Any errors caught here are logged and then rethrown so I can inform the user. So, knowing that my database class may rethrow an error, my business class code will also be written in a try catch finally block.
So at this point I have a number of possible outcomes that I want to inform the user via the UI:
1) Everything was fine and the widget was added.
2) Something happened with the database write and the user should try again later.
3) The user forgot to name the widget.
My question is: should I write my UI in a try catch block and then throw a custom Exception with an Exception.Message in the business layer if anything goes wrong, or just have my business logic return a string that is the message? I'll want to know if the process was successful or not, because I'll want to format the actual message differently, so I'd have to use if...elseif to determine if the message was bad or not.
It seems like throwing a custom Exception in the business layer may be a good way to tell the UI something bad happened. If the UI doesn't catch anything then of course the operation was successful. Then again throwing an exception for missing data seems a bit hefty.
I am currently writing a C# web service which has several methods, one of which has to receive HTTP POST requests. The first thing i have done is alter the web.config file in the web service project as below.
But when i run this i get "The remote server returned an error: (500) Internal Server Error". If i remove the parameter, by removing the stringbuilder and byte code, as well as having no parameter in the web service, it works. So it is obviously a problem with the parameters. I actually want to send more data, and was using a string parameter in the web service, but this also failed.
I have a static dictionary object which hold some Key and Value pairs in our site.We are getting Indexoutofrange exception some times and we couldn't figureout the problem why it is causing.This error is logged several times in the log file and site went down.Do you have any idea why this is happend?Please provide your advice ASAP as we are facing this issue in live server.
I have an existing ASP.NET application and there is a requirement in which i need to use ASP.NET MVC in that. So altogether i need to mixing ASP.NET Webforms and ASP.NET MVC I am following an article [URL] I am done with all the steps. But its not working as expected.
When ever i add this to the web.config i am getting error. HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. ERROR CODE: 0x80070032 My OS is Vista Enterprise Edition.
I am using Server.Transfer("axpx page", True) in my page.aspx.vb code. This line of code is there in the Try block. The exception "error : canot obtain value" is occurred when this line is executed. This is started all of sudden in the production.I have temporarily fixed this by keeping this line after try - catch block. But I'm not sure why is this problem occurred?
I'm new to this forum. I was directed here from an Expression Web forum. I am using Expression Web, but this seemed like the most appropriate place to post. I have a site [URL] that uses masterpages and I'm having a problem...sometimes...when I publish the site.
I m uploading file to a directory inside my website root directory like this-
I m getting exception-
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:Documents and SettingsAdminMy DocumentsVisual Studio 2008WebSitesElcomponics Sales-BDsamples�50841010_sd113201031833.pdf'.
When i deployed my app on server and accessed it from client system. It is not throwing exception.What is the difference?
Still i want to confirm will it throw the same exception in case i deployed it to server and access it from client.
I have an ASP.NET application that was working fine on my server up until last night when I installed a bunch of windows updates, now it's throwing this exception : System.Security.SecurityException: Requested registry access is not allowed.Unfortunately there is some things that makes this hard to debug. I added the debug="true" attribute to the web.config file to get the line where the exception is lauched. The line identified in my code is an End If and the code just before seems benign :
I am using a formview on main web page and the Item template displays my data correctly but I get and error when I try and link to the edit or insert templates.This happens on our remote tesing server only.On my local machine running the page on the local server in VS 2010 everything works fine.But then doesn't it always work on your local machine.I might also mention that I am compiling for asp.net 4.0. Here is the stack trace :
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'MYCORPABIGWEB01$'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
I am building a web application that is used to access and report to and from a database in a small compnay. The company has there own server for their network and design software. What I want to do is use this netwrok to host the website I have built. What im wanting to know is will this be secure? Can use the comapnys server to host the site, and in a sense not put the website online so that just the computers on the server can access the website? Will this be secure?
Thing is, if I run this locally and drop my internet connection the web service returns a 500 error (like I want it to do) and deleteCustomer(customer.id); is not called. However, on the live site if I drop my connection the web service does not return an error and deleteCustomer(customer.id); is called even if I don't have a connection to the internet (customer gets deleted from local database without being posted to the web server).
I am trying to handle the unhandled exceptions in my project.I tried with this following code in my web.config filebut it is not at all redirecting to an error page which i have created instead of that it is throwing an exception in my code itselef. How to print the error description over therein my custom error page.