C# Corner

Resources  
  • Exception HandlingJun 12, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • Exception HandlingJul 21, 2001. Exceptions in C# provide a structured, and type-safe way of handling both system level and application level error conditions. The exception mechanism in C# is very similar to that of C++, with a few important differences.
  • ASP.NET and VB.NET Error HandlingAug 24, 2001. ASP.NET and VB.NET both are providing excellent error handling options when compared with ASP and VB6. In VB.NET we can make use of the structured way of error handling with the Try & Catch statement.
  • Validation Controls in Web Forms: Part IAug 24, 2001. Validation is one of the less talked about areas – often taken for granted.
  • Exception Handling in C#Oct 17, 2001. Exception handling is a builtin mechanism in .NET framework to detect and handle run time errors.
  • Exceptions and Exception StackNov 16, 2001. The purpose of this tutorial is to explain firstly how you would go about creating your own set of exceptions to trap error conditions that could occur in your code or library, for your own benefit or for the benefit of another developer using your library. The second lesson is on how the C# exception stack works, and how you can use it to catch all types of exceptions.
  • Low Cost Credit Card VerificationMar 15, 2002. The last digit of a credit card is a check digit that is used to detect keystroke errors when a check card is entered into a computer.
  • MP3 JukeBoxApr 30, 2002. This is stable code and more generic than the first release. It has better error handling now to make it more 'idiot proof'.
  • Custom Error Handling in ASP.NETMay 30, 2002. Structured exception handling is a fundamental part of the CLR and provides .Net programmers a great way of managing errors. In addition to CLR exception system, ASP.Net also provides ways of handling errors.
  • Using Error Provider Control in Windows Forms and C#Oct 08, 2002. In this example we will see how to use the ErrorProvider control in Windows forms to provide validations in Windows Forms and display user-friendly error messages to the user if the validation fails.
  • Error Logging in ASP.NETSep 02, 2003. I have written some code that provide your system with some nice features on error logging in ASP.NET.
  • Export ASP.NET DataGrid to ExcelSep 08, 2003. Export to Excel is one of the most common functionality required in ASP.NET pages. Users can download the data from the DataGrid into an Excel spreadsheet for offline verification and/or computation.
  • Enter Null Values for DateTime Column of SQL ServerSep 26, 2003. Inserting a null value to the DateTime Field in SQL Server is one of the most common issues giving various errors. Even if one enters null values the value in the database is some default value as 1/1/1900 12:00:00 AM.
  • Oracle Data Provider for .NET : Part VIFeb 20, 2004. Oracle Data Provider for .NET (ODP.NET) is an implementation of a data provider for the Oracle database. ODP.NET uses Oracle native APIs to offer fast and reliable access to Oracle data and features from any .NET application.
  • Learning Visual Studio 2005 IDE - The DesignerJun 07, 2004. In this article of Learning Visual Studio 2005 IDE series, I will explore some of the designer features and the breakdown of the classes of a Windows Forms project.
  • Evolving Register Network using Genetic Algorithms in C# Jun 23, 2004. Genetic Algorithms are powerful AI tools because they can evolve through trial and error and converge into a solution. In this article we will use genetic algorithms to come up with an analog solution.
  • Handling Oracle Max Open Cursor Error when Fetching Multiple Rows in ADO.NETAug 18, 2004. When working with Microsoft technologies, MS SQL Server comes out as a natural choice for the database. While it is a fact that .NET Framework has extensive support for SQL server, when you work with other databases like Oracle the situation might turn out to be a little more tricky than it is with SQL Server.
  • Logging Errors in a XML FileAug 26, 2004. Error handling and logging errors at a common place is something, which is required in every piece of code you write. The attached source code is an error logger class that I've used in all of my applications. This class writes errors to XML files.
  • Best Practices of Exception ManagementMar 08, 2005. Exception management is one of the key area for all kinds of application development .You should adopt an appropriate strategy for exception management to build high quality and robust application .It is a very powerful concept and makes the development work very easy if its used efficiently.
  • Floating-Point in .NET Part I: Concepts and FormatsApr 18, 2005. The first in a three part series, this article introduces the basic concepts of floating-point arithmetic: number formats, accuracy and precision, and round-off error.
  • Custom Error Handling Using ASP.NETJul 07, 2005. Sometimes in your application, you may want to show some decent error messages other than red error messages and some message when page is not found or server is busy. We will see custom error message handling mechanism in this article using ASP.NET.
  • Better Exception Handling in Visual Studio 2005Nov 16, 2005. With many new cool features, components, controls, and tools, Visual Studio 2005 definitively is a winner. In this article, I discuss the new exception handling dialog in Visual Studio 2005.
  • How to Overcome Error "Access to the Path Containing 'hash.web' is Getting Denied."Jan 08, 2006. The article is about how to overcome with the error that reads "Access to the path containing 'hash.web' is getting denied."
  • Auditing and Logging ExceptionsFeb 01, 2006. This article shows how to handle a SQL Server error condition by using the SQL Server .NET Framework data provider.
  • Exception ManagementFeb 02, 2006. Correct exception handling in your Web pages prevents sensitive exception details from being revealed to the user. The following recommendations apply to ASP.NET Web pages and controls.
  • File uploader in C#Feb 13, 2006. This article shows a simple Web user control for uploading any file up to 2 MB to the specified folder using C#.
  • The request failed with HTTP status 401: Access DeniedJun 30, 2006. An unhandled exception occurred during the execution of the current Web request. Please review the stack trace for more information about the error and where it originated in the code.
  • The database DLL 'crdb_adoplus.dll' could not be loaded.Aug 01, 2006. Failed to load database information. Details: The database DLL 'crdb_adoplus.dll' could not be loaded.
  • Event and Error LoggingDec 15, 2006. This article describes an approach to writing to a custom error log and to writing events into the system event log.
  • Extend the Textbox Control to Validate Against Regular ExpressionsJan 05, 2007. This article describes an approach to validating text box entries against a regular expression.
  • HTTP:/1.1 500 Internal Server ErrorFeb 09, 2007. If you are running two versions of ASP.NET, you may get HTTP:/1.1 500 Internal Server Error when creating a new Web project or opening an existing Web project in Visual Studio.
  • Cannot perform '>' operation on System.DateTime and System.DoubleFeb 22, 2007. I get error "Cannot perform '>' operation on System.DateTime and System.Double" when applying a filter on DataView.
  • Error Provider in C#Mar 09, 2007. This article shall address the use of the error provider control in Win Forms application development. The error provider control is most useful in displaying errors associated with data entry tasks on a Windows form.
  • Concurrency violation: the UpdateCommand affected 0 records. Mar 27, 2007. When you use a DataAdapter object to write changes back to a database by means of a stored procedure, you may receive the following error message: Additional information: Concurrency violation: the UpdateCommand affected 0 records.
  • Aspnet_wp.exe was recycled errorMar 27, 2007. Occasionally, slow writes to a client cause Aspnet_wp to recycle on false deadlocks, which generates this error in event log.
  • Web Access Failed Error Mar 30, 2007. Web Access Failed Error Message When You Use Visual Studio .NET with IIS 6.0 to Create an ASP.NET Web Application.
  • Debugging Windows Forms Run-Time Error 101 Using C#Apr 11, 2007. This article will give you step-by-step introduction to debug Windows Forms application run-time error using C#.
  • Error handler for web applicationsMay 15, 2007. In this article I will describe the error handler for ASP.NET 2.0 applications, that is developed in a separate class library project . You can use it in any web application you want by adding a reference to the compiled dll assembly without writing many lines of code. The examples are written using C#.
  • Error Opening SSIS PackageMay 30, 2007. I got a weird error when trying to open an SSIS package in VS2005.
  • Generic Error Logger using ASP.Net & C#Jul 09, 2007. In this article I just want to put some light on "global.asax" file & how we can make use of "Application_Error".
  • Connection PoolingAug 11, 2007. While performing any database activity it is necessary that every single connection need to be closed, but in case your application throws some exception in that case our connection wont’ get closed. And you will get error “Cannot open connection, it is already open” In this article I will be discussing what is connection pooling? Why connection polling & how we can enable connection pooling etc.
  • Solution for "A Graphics Object cannot be Created from an Image that has an Indexed Pixel Format"Sep 10, 2007. In this article, you can learn how to avoid the issues/errors when you access/edit indexed pixel format images using few steps.
  • AJAX AutoCompleteExtenderOct 04, 2007. In one of the Ajax project while using <ajaxToolkit: AutoCompleteExtender> I was getting following error: Error Creating control - autoComplete1. This control cannot be displayed because it's tag prefix is not registered in the web form.
  • Exception Handling in WCF using Fault ContractJan 03, 2008. This article demonstrates how to get error information from a service to a client using fault contract in WCF.
  • One or more rows contain values violating non-null, unique, or foreign-key constraints Mar 14, 2008. You may get this error when using a typed DataSet. This tip shows how to fix it.
  • Use image for error display in ASP.Net validatorsMay 26, 2008. This articles demonstrates the use of images to display errors in ASP.Net for all kinds of validators.
  • Coding Pattern for Enabling ControlsJul 16, 2008. Writing code to enable the controls in your application at the correct times can be difficult and error prone. This article describes a reliable way to code your control enabling.
  • Software Testing TechniquesJul 16, 2008. This article tells us that Testing should systematically uncover different classes of errors in a minimum amount of time and with a minimum amount of effort. Because of the fallibility of its human designers and its own abstract, complex nature, software development must be accompanied by quality assurance activities.
  • Exception and error handling in enterprise applicationsJul 31, 2008. In this article, I try to cover the key principles and the main techniques of exception and error handling with examples in SQL Server, Oracle and Microsoft .NET.
  • Render iteration through an object collection possible using foreach keywordAug 28, 2008. This article gives you an answer that, why we get a run time error when we use the foreach loop to iterate through our customized objects container collection.
  • Web.config file configures fundamental settingsSep 10, 2008. Every web application in ASP.NET includes a web.config file that configures fundamental settings from error message to security.
  • Invalid FORMATETC structure ErrorSep 12, 2008. This tip shows how to fix Invalid FORMATETC structure error when you drag and drop a control from Toolbox to a XAML file.
  • Error 501/505: Not implemented or not supported.Sep 14, 2008. Read this article if you are getting Error 501 not implemented or not supported.
  • Handling AJAX ErrorsOct 20, 2008. This Article describes about handling AJAX errors.
  • The "SplashScreen" parameter is not supported by the "MarkupCompilePass1" ErrorNov 26, 2008. You get the "SplashScreen" parameter is not supported by the "MarkupCompilePass1" error message when create and run WPF applications in Visual Studio 2008 SP1.
  • Error Result 1 Returned from 'C:\WINDOWS\system32\cmd.exe'Feb 04, 2009. I keep getting the following error message every time I try to run or build a C++ application in Visual Studio 2008.
  • Unit Testing with VS 2008 Team editionFeb 15, 2009. Unit tests allows the developers and testers to check the logical errors in the methods of classes in C# and VB.NET Projects.Unit test can be created once and can be run every time that source code changes.Unit test cases make sure that no bugs are introduced when you write the new code.
  • Exception handling using Enterprise application block in 6 StepsMar 20, 2009. Exception handling is one of the most important tasks in any application. Many applications either do not handle applications or they handle it in an adhoc manner. In this section we will see how we can use the readymade exception handling block so that we do not need to code and build error handling routines from scratch.
  • The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)May 12, 2009. You are unable to access the reporting site for our TFS project. You are able to view individual reports from VS, but you cannot get to the reporting site to edit them. Whenever you try to go to it (By right clicking on Reports->Show Report Site in Team Explorer), you get the SQL Server Reporting Services Error.
  • Rectifying MACHINE CHECK EXCEPTION Error Message in Windows XPMay 18, 2009. A STOP error message in Windows XP is typically caused after your computer encounters a serious system error. Two major consequences that you might face after the occurrence of a STOP error can be unbootable hard drive and data inaccessibility.
  • Analizing data to best customers using Crystal ReportsMay 22, 2009. In the sales analysis, there is a principle named the Pareto principle also known as the 80-20 rule. The 80-20 rule states that 80% of the effects come from the 20% of the causes and then the remaining 20% effects come from 80% of the causes. Pareto observed that 80% of the land in Italy was owned by 20% of the population. One example in the IT world is that Microsoft has noted that 20% of the most reported bugs are the causes of the 80% of the errors or crashes of the systems. After Pareto observed this principle, a lot of application appeared. One of the most common applications of the Pareto principle is in the sales analysis. Companies perform analysis in their sales orders in order to discover the best customers, that is, the 80% of the sales come from the 20% of the customers. In this article, I will show how to perform a sales analysis using Crystal Reports. For this example, we will use the AdventureWorks database shipped with SQL Server 2005.
  • OWC spreadsheet Crashing issueMay 24, 2009. When you edit OWC spreadsheet. StartEdit or EndEdit events thows runtime Error R6025 Pure virtual function call
  • Introduction to Error Handling in JavaScriptAug 26, 2009. This article explains about Error Handling in JavaScript.
  • List Events Handling in SharePoint 2007Sep 07, 2009. The objective of this article is to give a very basic explanation of how to catch an event on a SharePoint list and deploy them programmatically. I will achieve in this article "User will get error message; whenever any item will get deleted from a particular list ".
  • ASP.NET Web Configuration FileNov 11, 2009. In this article I will explain you about ASP.NET Web Configuration File.
  • C# Preprocessor Directives Dec 18, 2009. In this article I will explain you about C# Preprocessor Directives.
  • Rollback, Commit, and Savepoints in ADO.NETJan 20, 2010. In this article I will explain about Rollback, Commit, and Savepoints in ADO.NET.
  • Validation Summary In Silverlight 3Jan 28, 2010. In this article we will see how we can do custom error messages if required.
  • Is Operator in C#Feb 24, 2010. The Is operator in C# is used to check if a type of an object is compatible with the other type. If type is not compatible, you will also see C# compiler will through an error in Visual Studio IDE.
  • System.Windows.Xps.Packaging Reference MissingMar 01, 2010. If you need to use XpsDocument class in your WPF project, you must add reference to System.Windows.Xps.Packaging namespace.
  • 4 Steps to Enable Instrumentation in WCF Mar 14, 2010. Many times we would like to monitor events of WCF application in production environment. We would like to monitor events like errors, security audits, performance etc. This can be achieved by extending the ASP.NET health monitoring system in WCF. The health monitoring system is also termed as instrumentation.
  • Handling Errors within Stored Procedures in SQL ServerApr 04, 2010. This article discusses the @@ERROR, SP_ADDMESSAGE, and RAISERROR functions within SQL Server.
  • How to Create a Custom Exception Error Page in SharepointApr 12, 2010. In this article we will see how to create a custom unhandled exception error page in Sharepoint.
  • The installed battery may not be properly connected to the computerMay 03, 2010. Recently I upgraded my laptop from Windows 7 Home Premium to Windows 7 Pro and started getting this annoying error message.
  • Exception while creating the sub webJun 07, 2010. In this article you will learn how to resolve security validation exception while creating the sub web.
  • Basics of Data Communication: Part 3Jul 15, 2010. This article will explain, Data Transmission, configuration, Time Domain Concepts, Frequency Domain Concepts, Why Digital Communication, Bandwidth, Data Rate, Channel Capacity, Error Rate, Noise, Nyquist Sampling Rate, Shannon Channel Capacity, Line Coding, Modem and Digital Modulation etc.
  • Basics Of Data Communication: Part 5Aug 01, 2010. This article will explain, Data Link Control, Error Detection, Flow Control, Error Control Mechanisms etc.
  • Error Provider in C#Aug 25, 2010. ErrorProvider control is used to notify users about input required fields on a Form and related message. This article demonstrates how to use an Error Provider control in C#.
  • How to handle error- Cannot open database "MSCS_Admin" requested by the loginSep 20, 2010. In this article you will learn how to handle error- Cannot open database "MSCS_Admin" requested by the login. The login failed.
  • Testing Techniques Sep 23, 2010. Software Testing Techniques is divide into 3 parts
  • LINQ to SharePoint: SPLinq in SharePoint 2010Nov 09, 2010. In this article, we will see how to work with LINQ to SharePoint. I have tried to address all the common errors we encounter when first time we start using LINQ against SharePoint.
  • HTTP Error 404.3: WCF Hostes in IIS. Add a MIME typeNov 15, 2010. In this article I will show you how to solve HTTP Error 404.3.
  • Handling exception in SharePoint 2010 object modelNov 15, 2010. In this article I will show how to handle the exception "Web application not found" in SharePoint 2010 object model.
  • How to activate the Taxonomy feature in SharePoint 2010Nov 17, 2010. In this article we will be seeing how to resolve “The Taxonomy feature (Feature ID "73EF14B1-13A9-416b-A9B5-ECECA2B0604C") has not been activated” error.
  • "You Cannot Install Mac OS X on This Volume: How to resolve?Nov 29, 2010. Here are the steps to resolve You Cannot Install Mac OS X on This Volume error.
  • Logging Errors with ELMAHJan 10, 2011. ELMAH (Error Logging Modules and Handlers) is a pluggable component that you can use to log errors without modifying the application code.
  • WCF: Error Handling and FaultExceptionsJan 12, 2011. This article reviews WCF error handling: FaultExceptions, FaultCodes, FaultReasons and custom FaultExceptions and then discusses best practices for error handling.
  • SharePoint 2010 Content Organizer ruleJan 13, 2011. In this article we will be seeing how to resolve the error selected library does not have the content type 'xxxxx'.
  • HTTP Error 404 in ASP.NET web applicationJan 19, 2011. In this article you will learn how to solve HTTP Error 404 in ASP.NET web application.
  • Windows Azure Tools: Failed to initialize Windows Azure storage emulator errorFeb 09, 2011. Resolving Failed to initialize Windows Azure storage emulator Error.
  • How to: Easily Query a DatabaseFeb 14, 2011. Often there is a need to obtain data from a database and sometimes it becomes hectic to write pieces of code again and again. Like Connection Open statement, Error Message Coding, Connection string etc. This can be optimized by making a class and calling the methods of the class with the appropriate query string.
  • Unable to Instantiate Module - SharePoint ErrorFeb 15, 2011. Here you will see how to solve the Unable to Instantiate Module - SharePoint Error.
  • How to resolve the error “Cannot change hidden attribute for this field”Feb 17, 2011. In this article we will be seeing how to resolve the following error “Cannot change hidden attribute for this field”.
  • Disable Custom Error Mode In SharePoint 2010Feb 18, 2011. How to disable SharePoint custom error mode. It will be very useful when you work with custom development In SharePoint 2010. By default SharePoint will display predefined errors, not the exact errors raised by the custom code. The following steps will help you to disable custom errors in SharePoint.
  • Windows Azure for developers Task4: Error Attaching the debugger in Windows Azure SDK 1.3Feb 21, 2011. Here you will see Windows Azure for developers Task4: Error Attaching the debugger in Windows Azure SDK 1.3.
  • Microsoft Sql Server Error : 10061Feb 21, 2011. Here you will see how to solve the Microsoft Sql Server error: 10061.
  • How to redirect to the SharePoint Success or Error Message pageMar 16, 2011. In this article we will be seeing how to redirect to the SharePoint Success or Error message page.
  • Feature Missing Error while Sharepoint Site ImportMar 30, 2011. Feature Missing Error while Sharepoint Site Import.
  • LINQ to SharePoint: CRUD operation on SharePoint 2010 list using SPLinqApr 13, 2011. In this article, we will see how to work with LINQ to SharePoint. I have tried to address all the common errors we encounter when we start using LINQ against SharePoint.
  • Fixing Error: "SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used"Apr 23, 2011. What is and how to fix error: "SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used"

About Error

An Error is a term used to describe any issue which is arises unexpectedly that cause a computer to not function properly and we can also say that it is abnormal form which stop the running program. In Computers we can encounter either software Error or hardware Error, Hardware Error are any defects with hardware inside the computer or connected to the computer. Although some hardware issues can be fixed with such things as firmware updates, typically any hardware errors caused by defects are resolved by replacing the defective hardware. But Software Error are the most common types of Error on a computer and are typically fixed with software updates or patches that are designed to fix errors in the code.

File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!
Download Free eBooks