.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 ‘Item’

FIX: A dump file may be generated in the Reporting Services Logfiles folder and you may receive an error message when you try to render a report in SQL Server 2008 Reporting Services

Symptoms
Consider the following scenario. In Microsoft SQL Server 2008 Reporting Services, you create a report. The report contains a Tablix data region item, a Subreport item, or a Chart item. The item has the NoRowsMessage property set, and there are no rows in the data region. Or, the report contains a Subreport item that displays error messages. The text box that is generated to display the error messages is split across a report page. You try to render the report. In this scenario, a dump file may be generated in the Reporting Services Logfiles folder. Additionally, you may receive an error message that resembles the following:

Assert in function = Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.get_SpaceBefore file =line = 0 expression = Unhandled managed exception: Type = System.NullReferenceException, Message = Object reference not set to an instance of an object.
Resolution
The fix for this issue was first released in Cumulative Update 1. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956717?(http://support.microsoft.com/kb/956717/) Cumulative update package 1 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909?(http://support.microsoft.com/kb/956909/)The SQL Server 2008 builds that were released after SQL Server 2008 was released

Description of the Duet 1.5 for Microsoft Office and SAP hotfix package: June 2009

Symptoms
This update applies only to Duet client computers and is also known as Hotfix 1 for Duet 1.5 Service Pack 2 (SP2).
Resolution
Issues that this hotfix package fixesFixed incorrect logging of errors that should be warnings. Added logging to identify when Outlook is started with a profile not configured for Duet. During metadata upgrade, increased the time that a user has to close running Office applications to 30 seconds. Improved Client Protocol Handler logging to include BoundItemType, BoundItemId, and CorrelationID values. In a primary or a secondary computer configuration, a metadata upgrade results in an item becoming unbound if it was created on the secondary machine and the Sweeper did not process it yet. Copying and pasting a bound item no longer results in a new bound item. The new item is a standard unbound Outlook item. Improved user feedback if Duet cannot log on to Exchange Server. The Duet add-in for Word no longer automatically loads unless a scenario is installed that needs Word integration. The metadata cache on a client is no longer encrypted. Fixed a scenario in which a Duet utility crashes with a System.NullReferenceException during metadata deployment if calls to the metadata server result in a time-out. Past occurrences of a bound recurring appointment series become unbound during Duet parallel appointment creation. Bound items become unbound if the OBASQLEXPRESS instance becomes unavailable while the Sweeper is running.

BUG: Assignment of Multi-Valued Objects in Request Object Causes Corruption in Scripting Dictionary

Symptoms
If items in the Request.Form or Request.QueryString collections that contain multiple values are assigned to a Scripting Dictionary object stored in the Session object, data corruption may occur. Corrupted data will manifest either as empty fields (that is, blank individual dictionary items) or items that contain garbage text.
A common example of this is a checkbox; checkbox controls can have the same name so that multiple values of a single named item can be returned to the server.
Resolution
When the assignment of a multi-valued item in the Request.QueryString or Request.Form collections to an item in the Scripting Dictionary object takes place without explicitly using the Item property of the object within the collection, a reference to the actual object is stored in the Scripting Dictionary instead of the intended value. This means that when the item stored in the Scripting Dictionary is referenced again, the Scripting Dictionary will refrence an object in the Request.QueryString or Request.Form collections instead of the intended string or integer values.

ACC2000: How to Create a Collection of Collections

Symptoms
A limitation of the Microsoft Visual Basic for Applications Collection object is that it cannot contain a user-defined data type. You can achieve similar functionality, however, by creating a collection that contains the elements that you would normally define in your user-defined data type, and then storing that collection in a second collection. This article shows you how to create such a nested collection.
Resolution
To create a collection within a collection, follow these steps:Create a module, and then type or paste the following procedure:

Function CollectionCollection()Dim elementDim insideCollection As New CollectionDim outsideCollection As New Collection’ Populate the first element of the collection and add’ it to the parent collection.insideCollection.Add KEY:=”fname”, Item:=”joe”insideCollection.Add KEY:=”lname”, Item:=”smith”insideCollection.Add KEY:=”age”, Item:=12outsideCollection.Add insideCollection’ Clear the collection – prevents duplication of elements.Set insideCollection = Nothing’ Populate the second element of the collection and add’ it to the parent collection.insideCollection.Add KEY:=”fname”, Item:=”fred”insideCollection.Add KEY:=”lname”, Item:=”smith”insideCollection.Add KEY:=”age”, Item:=14outsideCollection.Add insideCollection’ Print the contents of the parent collection to the Debug window.For Each element In outsideCollectionDebug.Print element(“fname”), element(“lname”), element(“age”)NextEnd Function To test the function, on the View menu, click Immediate Window, type the following command, and then press ENTER:
CollectionCollectionNote that the contents of the collection appear in the Immediatewindow.