Subject: Problem converting types in AssertionConsumerService.aspx Date: 2021-06-23 22:07:01 From: Planning & Business Source: problem-converting-types-assertionconsumerservice-aspx ---------------------------------------------------------------------- Hi, I have a very similar issue to the user here: https://www.componentpro.com/qa/easysaml-sp-initiatesinglesignon-second-call-issue I used the Saml2SSoDemo_2017/ServiceProvider_2017 vb code sample as a guide. My code succesfully logins at the IDP and returns to the AssertionConsumerService.aspx However it then crashes with: Object of type 'System.String' cannot be converted to type 'c_bc'. System.Object TryChangeType(System.Object, System.Reflection.Binder, System.Globalization.CultureInfo, Boolean) at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) at System.Reflection.RtFieldInfo.UnsafeSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) at System.Runtime.Serialization.FormatterServices.SerializationSetValue(MemberInfo fi, Object target, Object value) at System.Runtime.Serialization.FormatterServices.PopulateObjectMembers(Object obj, MemberInfo[] members, Object[] data) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObjectEnd(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Web.Util.AltSerialization.ReadValueFromStream(BinaryReader reader) at System.Web.SessionState.SessionStateItemCollection.ReadValueFromStreamWithAssert() at System.Web.SessionState.SessionStateItemCollection.DeserializeItem(String name, Boolean check) at System.Web.SessionState.SessionStateItemCollection.get_Item(String name) at System.Web.HttpSessionStateWrapper.get_Item(String name) at c_cy.Load[a](HttpContextBase ) at ComponentPro.Saml2.EasySaml.SamlServiceProvider.c_82c4548b(HttpContextBase ) at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContextBase httpContext, String& partnerIdP, String& authnContext, String& userName, Attribute[]& attributes) at ComponentPro.Saml2.EasySaml.SamlServiceProvider.ReceiveSingleSignOnRequest(HttpContextBase httpContext, String& partnerIdP, String& authnContext, String& userName, IDictionary`2& attributes) at WebSiteApp.ConsumerService.OnLoad(EventArgs e) in E:\Builds\1\WebSite\Build WebSitex64-devHayden4 to MIS-WEB3\Sources\WebSite\Development\dev-Hayden4\WebSite\WebSiteApp\AssertionConsumerService.aspx.vb:line 21 at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index