.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘information section’

DataSet column mapping throws an InvalidOperationException exception when the specified column is missing in ADO.NET

Symptoms
When you use DataSet column mapping in ADO.NET, an InvalidOperationException exception is thrown if the MissingMappingAction property is set to Error and the column mapping that you specify is missing.
Resolution
To resolve this problem, ensure that the column mapping that you specify exists. Refer to the “More Information” section for code that checks whether the specified column mapping exists.

DataSet column mapping throws an InvalidOperationException exception when the specified column is missing in a Visual C# application

Symptoms
When you use DataSet column mapping in ADO.NET, an InvalidOperationException exception is thrown if the MissingMappingAction property is set to Error, and if the column mapping that you specify is missing.
Resolution
To resolve this problem, ensure that the column mapping that you specify exists. Refer to the “More Information” section for code that checks whether the specified column mapping exists.

BUG: XmlTextReader Decodes URLs Before Downloading Resources Resulting in Unpredictable Behavior

Symptoms
When you use the XmlTextReader object to download resource files, the reader decodes the URL for the resources. If the URL contains any special characters (for example, ampersands or percent signs), this may result in unpredictable behavior.
Resolution
To resolve the problem, follow these steps: Use the XmlUrlResolver and the System.IO.Stream classes to map the specified URL.Create an XmlTextReader object and pass the Stream as the parameter. For an example, see the “More Information” section of this article.

BUG: Reference to Deferred Object in Stored Procedure Will Not Show in Sp_depends

Symptoms
The output of sp_depends for an object created with dependencies on objects whose name resolution is deferred will not be correct. For an example of this, see the MORE INFORMATION section of this article.
Resolution
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

“Object Has Been Deleted” Error Message When You Try to Save a New Page

Symptoms
When you save a posting that contains a SingleImagePlaceholderControl edit controlwith a custom placeholder control on the template, and the custom placeholder control that you create contains handle exceptions, an error occurs if the handle exception is called in the custom placeholder control logic. When the handle exception is called, the error is not caught correctly, and you receive the following error message in Microsoft Internet Explorer:

Object has been deleted. An attempt was made to access the properties or methods of an object that was deleted by the current session. For more information about the error message, see the “More Information” section.
Resolution
When you save a new posting with a custom placeholder, the placeholder calls the CmsHttpContext.Rollback() function if an error occurs in the placeholder. The next problem is that the <this.BoundPlaceholder>.Datasource property contains an error, and <this.BoundPlaceholder> is the name of a placeholder object. If any action is attempted on the <this.BoundPlaceholer>.Datasource property after the rollback, the error occurs. The error does not occur after the page has been saved and the rollback is called.