.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

handle missing types during deserialization

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
 
I have situations where I may have a type reference in the object graph that is no longer available because it has been depricated. These are objects defined outside the control of my serialization API. I need the deserializer to just ignore these objects and move on without erroring out with: "Unable to find assembly 'MyMissingAssembly, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'." My question is not why the error is occuring. I understand why. But how do I handle this error gracefully, have the missing types skipped, and continue deserializing the rest of the object graph? I have experimented returning a dummy class through the VersionDeserializationBinder.BindToType() method so that I can do type substitution with types I control. This works but I need a way to discriminate for which types I should do this for. So I need to know if the deserializer has access to the type in question before it attemts to deserialize the object. If only it could tell me it can't find it before it throws the error.  


View Complete Post


More Related Resource Links

Sharepoint 2010 Missing Content Types

  
Has anyone run into an issue where your system's base content types dissappear after deploying a new site definition.  We are doing a proof of concept using several CMS solutions and decided to see how sharepoint would fare in the process.  I worked on the POC for 6 weeks without any issues.  After selecting sharepoint as the solution I started refactoring my code into a more logical structure as many of the components were developed from sample code.  I created a couple of custom site definitions that were pretty simple.  Basically I copied the onenet.xml from the publishing site template that sharepoint uses and made a few simple modifications like associating my custom master page and a custom content type with the default page.  When I initially developed these I had no issues at all but yesterday I suddenly was not able to create sites using these site defs.  I figured there was some kind of conflict with my old templates so I deleted all site collections on the server and then tried to create a new site collection and then I couldn't even create a base publishing site.  I got an error indicating the base content type did not exist.  After spending hours going through logs it was clear that sharepoint was not able to build the content type hiearchy when creating new sites so I took a look at the UI and there were only abo

SP2010 Upgrade Error: Missing Reusable Content Types

  

During the in-place upgrade from MOSS2007 to SharePoint 2010, I experienced the following issue for numerous site collections.  Even though these were errors, the configuration wizard completed with Errors stating that there were some sites not fully upgraded.

I cannot determine how to resolve this error and complete the content database upgrade.   Thanks in advance.

 

In the Upgrade-YYYYMMDD-######-##-error.log file, the following details were logged for about 15 different site collections:

[OWSTIMER] [SPSiteWssSequence2] [INFO] [6/12/2010 8:29:44 AM]: SPSite Url=https://sub.domain.com/site
[OWSTIMER] [SPSiteWssSequence2] [ERROR] [6/12/2010 8:29:44 AM]: Feature upgrade incomplete for Feature 'PublishingSite' (Id: 'f6924d36-2fa8-4f0b-b16d-06b7250180fa') in Site 'https://sub.domain.com/site'. Exception: The parent content type specified by content type identifier 0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39 does not exist.
[OWSTIMER] [SPSiteWssSequence2] [INFO] [6/12/2010 8:29:46 AM]: SPSite Url=https://sub.domain.com/site
[OWSTIMER] [SPSiteWssSequence2] [ERROR] [6/12/2010 8:29:46 AM]: Feature upgrade incomplete for Feature 'PublishingLayouts' (Id: 'd3f51be2-38a8-4e44-ba84-940d35be1566') in Site 'https://sub.domain.com/sit

Missing Content Types from Central Administration site. How do I fix?

  

SharePoint 2010 Enterprise (Configuration database version: 14.0.4762.1000 ) 

When trying to create a new site (Document Center)  collection via Centeral Administration, I get the following error:

The parent content type specified by content type identifier 0x0101 does not exist.

In reviewing the log files there are a series of errors like:

Failed to get the content type elements. 

#5008a: Expression must evaluate to a node-set.

(#-2146231997: Expression must evaluate to a node-set.)

...  Repeat multiple times ... 

Failed to find <ListTemplate> tag corresponding to ID "101", tried both onet.xml for site definition ID "0" language "1033" and global site definition.  Operation failed. 

SPException thrown: Message: The parent content type specified by content type identifier 0x0101 does not exist.. Stack:    at Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag(UInt32 tagId, ULSCat traceCategory, String resourceId, Object[] resourceArgs)     at Microsoft.SharePoint.SPContentType..ctor(SPContentTypeId contentTypeId, SPContentType parentContentType, SPContentTypeCollection cts)     at Microsoft.SharePoint.SPContentType..ctor(SPContentTypeId contentTypeId, SPConten

Custom Content Types Missing after 2007 Upgrade to 2010

  

Hello everyone - 

We have a portal solution leveraging custom publishing content types and page layouts in 2007. The database was backed up, and the upgrade was done via dbattach on a 2010 environment. The site works seemingly fine - though there is some strange behavior we noticed where a few content types are missing.

The Content Type Gallery lists only say 10 of the 15 content types we should have. Loading the Master Page and Page Layout Gallery we see the inheriting content type, though clicking on it yields in an error as though it cannot find the content type. These are all custom content types, though they are not very different from each other.

Has anyone experienced this problem and devised a solution? - I tried to iterate through the site collection via a console application to see if I could somehow update or intercept the issue with the missing content types to no avail. I'll be open to suggestions / tools recommended...

All the best,

Alex


Alex Talarico

Custom Content Types Missing after 2007 Upgrade to 2010

  

Hello everyone - 

We have a portal solution leveraging custom publishing content types and page layouts in 2007. The database was backed up, and the upgrade was done via dbattach on a 2010 environment. The site works seemingly fine - though there is some strange behavior we noticed where a few content types are missing.

The Content Type Gallery lists only say 10 of the 15 content types we should have. Loading the Master Page and Page Layout Gallery we see the inheriting content type, though clicking on it yields in an error as though it cannot find the content type. These are all custom content types, though they are not very different from each other.

Has anyone experienced this problem and devised a solution? - I tried to iterate through the site collection via a console application to see if I could somehow update or intercept the issue with the missing content types to no avail. I'll be open to suggestions / tools recommended...

All the best,

Alex


Alex Talarico

SharePoint Tutorial - Content Types

  
SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

UML Diagram Types

  
UML provides a number of diagram types as a mechanism for entering model elements into the model and showing overlapping sets of models elements and their relationships. UML does not specify what diagrams should be created or what they should contain, only what they can contain and the rules for connecting the elements. The diagram types include:

UML Diagram Types - 2

  
Further diagram types include:

Activity Diagrams - a generic flow chart used much in business modelling and sometimes in use case modelling to indicate the overall flow of the use case. This diagram type replaces the need for dataflow diagrams but is not a main diagram type for the purposes of analysis and design.

Ready made List Types provided by SharePoint

  
SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Tuples, Anonymous Types, and Concrete Types

  
Tuples can save you a great deal of repetitive tasks. They can also lead to completely unreadable code in a language like C#. Tuples are data values that contain N items. The .NET framework supports tuples containing 1 to 8 members. To use tuples with more than 8 members, you use another tuple for the member of an octtuple

Content Types in MOSS 2007

  
In this article I will try to describe the one of the best feature in Microsoft office Share Point 2007 called Content Types.

Content types are simply collection of contents.Each content in a Content type can have different settings.Basically it is a reusable collection of settings which you want to apply to a particular category of contents.

Data Types - Date and Time in SqlServer

  
Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

Content Query Web Part missing in SharePoint 2010

  
If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Different types of applications in WPF

  
With Windows Presentation Foundation coming closer to its release date with Vista almost being upon us, more and more people are taking a look at programming in WPF

Date and Time Data Types and Functions

  
The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

Frequently Asked Questions - SQL Server Data Types

  
This is good and precise introduction and Frequently Asked Questions - SQL Server Data Types

Missing 'new item templates'

  

 Hi all,

          I am a 'newbie' to VWD and I am slowly working through the Basic Walkthrough Help files, and learning plenty along the way.

However, when I tried to create a new database in the LINQ control walkthrough I found that the option to create a new database is missing, and further investigation has found that many other new item templates are missing.

I am using a brand new machine with Windows 7 Ultimate and have enabled IIS and .NET from Control Panel-Programs-Turn Windows Features On-Off. I used the WPI to install all basic elements eg. IIS Components, SQL Server Express.

The only 'new item templates' I have when I right-click the App_Data Folder and choose 'new item' are:-

ADO.NET Data Service

AJAX Enabled WCF Service

Dynamic Data Field

SQL Server Database

Text File

XML File

Does anyone know where I have gone wrong.

 

Michael J. Hill


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend