From the following thread in the discussions:
http://silk.codeplex.com/discussions/269886
At the very least this note in code should also be placed as part of the installation notes and also where the call hangs.
// Note: On a development server (Cassini) you may get a serializationexception
// with custom identities.
//
For as much effort as went into this project, I don't understand why a workaround wasn't implemented.
System.InvalidOperationException was unhandled by user code
Message=There is an error in XML document (0, 0).
Source=System.Xml
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at MileageStats.Domain.Models.UserInfo.FromString(String userContextData) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Domain\Models\UserInfo.cs:line 43
at MileageStats.Web.Models.MileageStatsIdentity..ctor(FormsAuthenticationTicket ticket) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Web\Models\MileageStatsIdentity.cs:line 46
at MileageStats.Web.MvcApplication.PostAuthenticateRequestHandler(Object sender, EventArgs e) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Web\Global.asax.cs:line 156
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException: System.Xml.XmlException
Message=Root element is missing.
Source=System.Xml
LineNumber=0
LinePosition=0
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderUserInfo.Read3_UserInfo()
InnerException:
Comments: in my case adding a generated machine Key to the config file helped (using http://aspnetresources.com/tools/machineKey tool) something like <machineKey validationKey="3B4630393E490E7D5F0CEDAFC832E6C75FD0F6A916C9D5C2E36244737795EC594F42DA5CAA6C38CBEBDB20E89FED067BC3D6812AA083B98A14286466451777C1" decryptionKey="A219CA4EF9495433CB43560685760EEA5879EC8C4161638DA923065801348B8B" validation="SHA1" decryption="AES" />
http://silk.codeplex.com/discussions/269886
At the very least this note in code should also be placed as part of the installation notes and also where the call hangs.
// Note: On a development server (Cassini) you may get a serializationexception
// with custom identities.
//
For as much effort as went into this project, I don't understand why a workaround wasn't implemented.
System.InvalidOperationException was unhandled by user code
Message=There is an error in XML document (0, 0).
Source=System.Xml
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at MileageStats.Domain.Models.UserInfo.FromString(String userContextData) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Domain\Models\UserInfo.cs:line 43
at MileageStats.Web.Models.MileageStatsIdentity..ctor(FormsAuthenticationTicket ticket) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Web\Models\MileageStatsIdentity.cs:line 46
at MileageStats.Web.MvcApplication.PostAuthenticateRequestHandler(Object sender, EventArgs e) in C:\Users\SGM7\Documents\Silk\MileageStats\MileageStats.Web\Global.asax.cs:line 156
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException: System.Xml.XmlException
Message=Root element is missing.
Source=System.Xml
LineNumber=0
LinePosition=0
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderUserInfo.Read3_UserInfo()
InnerException:
Comments: in my case adding a generated machine Key to the config file helped (using http://aspnetresources.com/tools/machineKey tool) something like <machineKey validationKey="3B4630393E490E7D5F0CEDAFC832E6C75FD0F6A916C9D5C2E36244737795EC594F42DA5CAA6C38CBEBDB20E89FED067BC3D6812AA083B98A14286466451777C1" decryptionKey="A219CA4EF9495433CB43560685760EEA5879EC8C4161638DA923065801348B8B" validation="SHA1" decryption="AES" />