Serialization fails when implicit conversion method included

G

Guest

Hi all,

I have a healthy class defined that happily serializes and deserializes from
the underlying XML file.

The problem I hit is that, as soon as I add an implicit conversion in any of
the classes (I'm converting from my class into OleDbParameter), the
deserialization fails. The following is the error displayed when the code
fails during ASPX (C#) processing:

File or assembly name bwkeldu1.dll, or one of its dependencies, was not
found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name
bwkeldu1.dll, or one of its dependencies, was not found.

Source Error:


Line 1119: {
Line 1120: System.IO.FileStream fs = new System.IO.FileStream(fileName,
System.IO.FileMode.Open, System.IO.FileAccess.Read);
Line 1121: System.Xml.Serialization.XmlSerializer serializer = new
System.Xml.Serialization.XmlSerializer(typeof(Options));
Line 1122: returnValue = ((Options)(serializer.Deserialize(fs)));
Line 1123: returnValue._fileName = fileName;


Source File: e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\options.cs Line: 1121

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'bwkeldu1.dll' could not be loaded.


=== Pre-bind state information ===
LOG: Where-ref bind. Location =
C:\DOCUME~1\RMLAPTOP\ASPNET\LOCALS~1\Temp\bwkeldu1.dll
LOG: Appbase = file:///d:/inetpub/wwwroot/NCR
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/DOCUME~1/RMLAPTOP/ASPNET/LOCALS~1/Temp/bwkeldu1.dll.



Stack Trace:


[FileNotFoundException: File or assembly name bwkeldu1.dll, or one of its
dependencies, was not found.]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) +307
System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity) +21
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +67
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +0
System.Xml.Serialization.Compiler.Compile() +409
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) +1259
System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace) +316
System.Xml.Serialization.XmlSerializer..ctor(Type type) +27
NCR.BackOffice.Options.Open(String fileName) in e:\my projects\visual
studio projects\ncr\ncr.backoffice.v2\options.cs:1121
NCR.BackOffice.Settings.get_Options() in e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\settings.cs:159
NCR.BackOffice.UI.INavigator.PopulateNavigator(Page Page, UltraWebTree
uwt, Settings settings) in e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\ui\inavigator.cs:18
NCR.Common.Navigation.UWT.Page_Load(Object sender, EventArgs e) in
d:\inetpub\wwwroot\ncr\common\navigation\uwt.aspx.cs:59
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 
G

Guest

The module currently includes the following 'using' statements:

using System;
using System.Xml;
using System.Xml.Serialization;
using System.Reflection;


Robert Magnusson said:
Hi all,

I have a healthy class defined that happily serializes and deserializes from
the underlying XML file.

The problem I hit is that, as soon as I add an implicit conversion in any of
the classes (I'm converting from my class into OleDbParameter), the
deserialization fails. The following is the error displayed when the code
fails during ASPX (C#) processing:

File or assembly name bwkeldu1.dll, or one of its dependencies, was not
found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name
bwkeldu1.dll, or one of its dependencies, was not found.

Source Error:


Line 1119: {
Line 1120: System.IO.FileStream fs = new System.IO.FileStream(fileName,
System.IO.FileMode.Open, System.IO.FileAccess.Read);
Line 1121: System.Xml.Serialization.XmlSerializer serializer = new
System.Xml.Serialization.XmlSerializer(typeof(Options));
Line 1122: returnValue = ((Options)(serializer.Deserialize(fs)));
Line 1123: returnValue._fileName = fileName;


Source File: e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\options.cs Line: 1121

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'bwkeldu1.dll' could not be loaded.


=== Pre-bind state information ===
LOG: Where-ref bind. Location =
C:\DOCUME~1\RMLAPTOP\ASPNET\LOCALS~1\Temp\bwkeldu1.dll
LOG: Appbase = file:///d:/inetpub/wwwroot/NCR
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/DOCUME~1/RMLAPTOP/ASPNET/LOCALS~1/Temp/bwkeldu1.dll.



Stack Trace:


[FileNotFoundException: File or assembly name bwkeldu1.dll, or one of its
dependencies, was not found.]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) +307
System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity) +21
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +67
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +0
System.Xml.Serialization.Compiler.Compile() +409
System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) +1259
System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace) +316
System.Xml.Serialization.XmlSerializer..ctor(Type type) +27
NCR.BackOffice.Options.Open(String fileName) in e:\my projects\visual
studio projects\ncr\ncr.backoffice.v2\options.cs:1121
NCR.BackOffice.Settings.get_Options() in e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\settings.cs:159
NCR.BackOffice.UI.INavigator.PopulateNavigator(Page Page, UltraWebTree
uwt, Settings settings) in e:\my projects\visual studio
projects\ncr\ncr.backoffice.v2\ui\inavigator.cs:18
NCR.Common.Navigation.UWT.Page_Load(Object sender, EventArgs e) in
d:\inetpub\wwwroot\ncr\common\navigation\uwt.aspx.cs:59
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top