London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Exception: "Invalid cast from 'System.Int32' to 'System.IntPtr'. " when configuring Mirroring 1.0

Vote:
 

I have been trying to configure Mirroring 1.0 on an EPiServer CMS 6.0 website. Everything is fine until I set up the destination to the remote website settings and I get the following exception when I try opening the definition.

[InvalidCastException: Invalid cast from 'System.Int32' to 'System.IntPtr'.]
   System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) +12559486
   System.Int32.System.IConvertible.ToType(Type type, IFormatProvider provider) +49
   System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +12816959
   EPiServer.Implementation.Serialization.ObjectReader.SetEmptyValues(FieldInfo[] infos, Object[] values) +687
   EPiServer.Implementation.Serialization.ObjectReader.MapNames(ISchema serializedSchema, Type objectType, String[] names, Object[] data) +311
   EPiServer.Implementation.Serialization.ObjectReader.Populate(Object newObject, ISchema serializedSchema, String[] names, Object[] data) +1209
   EPiServer.Implementation.Serialization.ObjectReader.LoadObjectForType(Type type, ISchema serializedSchema, Type[] genericTypeParameters) +233
   EPiServer.Implementation.Serialization.ObjectReader.LoadObject() +369
   EPiServer.Implementation.Serialization.ObjectReader.LoadObjectForType(Type type, ISchema serializedSchema, Type[] genericTypeParameters) +458
   EPiServer.Implementation.Serialization.ObjectReader.LoadObject() +369
   EPiServer.Implementation.Serialization.ObjectReader.LoadObjectFromInterface() +102
   EPiServer.Implementation.Serialization.ObjectReader.LoadObject() +382
   EPiServer.Implementation.Serialization.ObjectReader.LoadObjectForType(Type type, ISchema serializedSchema, Type[] genericTypeParameters) +458
   EPiServer.Implementation.Serialization.ObjectReader.LoadObject() +369
   EPiServer.Implementation.ObjectStoreBase.Deserialize(Byte[] serializedItem) +174
   EPiServer.Implementation.SqlObjectStore.RelatedItemsFrom(Object fromId, Boolean includeSubclasses, LoadMethod loadMethod) +753

[ObjectStoreException: Exception on Load of 63acc514-1a2f-4cbf-9973-269dbace5f0e in object store localdatabase.]
   EPiServer.Implementation.SqlObjectStore.RelatedItemsFrom(Object fromId, Boolean includeSubclasses, LoadMethod loadMethod) +1474
   EPiServer.Implementation.SqlObjectStore.RelatedItemsFrom(Object fromId, LoadMethod loadMethod) +27
   EPiServer.Implementation.CacheObjectStore.RelatedItems(Object id, Boolean isFromRelation, LoadMethod loadMethod) +670
   EPiServer.Implementation.CacheObjectStore.RelatedItemsFrom(Object fromId) +108
   EPiServer.Enterprise.Mirroring.MirroringInfo.GetDestinations() +216
   EPiServer.UI.Admin.ContentMirroringView.OnLoad(EventArgs e) +371
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

The mirroring channel is set to mirror everything from the root page down, so I set the destination Name to 'MirroringTarget', the Remote Site to the remote website definition I created earlier (which pings fine) and set the Root page on destination to the id of the root page (268 in this case).

Once I press save I get the exception above.

Any suggestions (other than use Mirroring 2.0) would be greatfully recieved?


Thanks
Jim

 

 

 

 

 

#58837
May 08, 2012 16:06
Vote:
 

I have the same problem after upgrading a site from 4 to 6 R2. Did you have any solution or an open ticket with support?

#59018
May 16, 2012 10:37
Vote:
 

John, there is a registered and fixed bug on it. But I think it's only valid if you run ASP.NET 4.0

Bug #74366: Mirroring 1.0 doesn't work in CMS 6 R2

#59019
Edited, May 16, 2012 11:05
Vote:
 

ok, is this bug fixed in the latest version of R2 that was released in march? If not, is there a hotfix for this?

If it was fixed in the march version then I have a problem - I am using the version from March (assembly 6.1.379.0 with file version 6.1.379.501)

#59028
May 16, 2012 15:30
Vote:
 

Just spoke with EPiServer support about it, they have fixed it but haven't created a hotfix for it.

#62607
Oct 30, 2012 16:10
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.