Home » Microsoft TechnologiesRSS

Error after CS site migrated to SP2010 Env + Unable to cast object of type 'System.Security.Principa

Hi,

we are migrating our existing commerce server 2009 and SharePoint 2007 site to SharePoint 2010 Environment

we have already done the steps as in CS 2009 Template Pack for SP2010 documentation

when I created new site using SharePoint Commerce Services Configuration , site is created successfully

but when I enter/save Default Catalog name and channel name then I gets error on site

like

Server Error in '/' Application.

 


 

Unable to cast object of type 'System.Security.Principal.WindowsIdentity' to type 'Microsoft.IdentityModel.Claims.ClaimsIdentity'.

Description:

 

Source Error:

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

 

[InvalidCastException: Unable to cast object of type 'System.Security.Principal.WindowsIdentity' to type 'Microsoft.IdentityModel.Claims.ClaimsIdentity'.]

 Microsoft.Commerce.Portal.Common.SiteContext.RetrieveValueFromClaims(String claimType, String issuer) +79

 Microsoft.Commerce.Portal.Common.SiteContext.get_IsUserProfileAuthenticated() +92

 Microsoft.Commerce.Portal.Common.Session.DefaultSessionProvider.GetUserIdCookieName() +30

 Microsoft.Commerce.Portal.Common.Session.DefaultSessionProvider.get_UserId() +58

 Microsoft.Commerce.Portal.Common.SiteContext.GetCurrentRequestContext() +69

 Microsoft.Commerce.Portal.Common.<>c__DisplayClass3.<ProcessRequest>b__0() +36

 Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +729

 Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27488118

 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) +27187865

 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) +93

 Microsoft.Commerce.Portal.Common.SiteContext.ProcessRequest(CommerceRequest request) +159

 Microsoft.Commerce.Portal.SiteMap.StoreNode.CreateChildNodes() +678

 Microsoft.Commerce.Portal.SiteMap.StoreNode.get_Children() +65

 Microsoft.Commerce.Portal.SiteMap.StoreMapCache.PopulateNodeMap(Hashtable nodeMap, StoreNode node) +52

 Microsoft.Commerce.Portal.SiteMap.StoreMapCache.AddRootNode(StoreNode rootNode) +320

 Microsoft.Commerce.Portal.SiteMap.StoreMap.LoadRootNode() +243

 Microsoft.Commerce.Portal.SiteMap.StoreMap.IsCatalogPage(String rawUrl) +97

 Microsoft.Commerce.Portal.SiteMap.StoreMap.FindNodeByUrl(String rawUrl) +74

 Microsoft.Commerce.Portal.SiteMap.StoreSiteMapProvider`1.FindSiteMapNode(String rawUrl) +59

 System.Web.SiteMapProvider.FindSiteMapNode(HttpContext context) +66

 System.Web.SiteMapProvider.get_CurrentNode() +52

 Microsoft.Commerce.Portal.SiteMap.StoreSiteMapProvider`1.GetRootNodeCore() +10

 System.Web.SiteMapProvider.get_RootNode() +14

 System.Web.UI.WebControls.SiteMapDataSource.GetNodes() +231

 System.Web.UI.WebControls.SiteMapDataSource.GetPathNodeCollection(String viewPath) +49

 System.Web.UI.WebControls.SiteMapDataSource.GetView(String viewName) +57

 System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +193

 System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +28

 System.Web.UI.Control.LoadRecursive() +66

 System.Web.UI.Control.LoadRecursive() +191

 System.Web.UI.Control.LoadRecursive() +191

 System.Web.UI.Control.LoadRecursive() +191

 System.Web.UI.Control.LoadRecursive() +191

 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

 


 

Version Information:

any body has any clue on this?

 


Stack Trace:

 


Warm Regards, Bhushan http://www.passionatetechie.blogspot.com
 

2 Answers Found

 

Answer 1

Have you tried KB 975603?
 

Answer 2

ok..

we managed to solved this one after some headache

basic thing is , verify that you have created your web application which will host the site by using SharePoint Commerce Configuration Wizard for SharePoint 2010

becasue it creates some profile providers related entries to your web.config file (I guess related with Claim based authentication)

after adding this line to web.config error was resolved

<membershipdefaultProvider="i">

      <providers>

        <addname="i"type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

</providers>

</membership>     

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter