I've recently upgraded my workstation from Vista to Windows 7 Enterprise and all seemed to have gone well. Projects build fine but am not experiencing an odd error when trying to debug our IIS hosted application locally. The app build and works as expected but when attaching to the IIS process (w3wp.exe) no symbols are loaded then when server processing is started an invalid cast exception is generated (see below).
Message="Invalid cast from 'System.DateTime' to 'Csla.SmartDate'."
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.DateTime.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Csla.Utilities.CoerceValue(Type desiredType, Type valueType, Object oldValue, Object value) in C:\Documents\Communicator\Trunk\Csla\Utilities.cs:line 191
I'm really stuggling to figure out whats happening as it isn't happening on my colleagues machines who are still running Vista.
Windows 7 Enterprise
Visual Studio 2008
.Net 2, 3, 3.5 and 4.0 installed
Any suggestions / pointers?
The line that the exception is thrown is 191 in Utilities.cs
return Convert.ChangeType(value, desiredType);
What is your line of code that triggers this? Is it a SetProperty() call?
Copyright (c) Marimer LLC