I have an ASP.NET custom control that has to serialize the following
class in order to save it to view state. If I leave out the
parameterless constructor I get:
System.IO.FileNotFoundException: File or assembly name luasprru.dll,
or one of its dependencies, was not found.
It works if I include a parameterless constructor. Most of the
postings regarding this type of error involve incorrect security
settings for the Windows temp folder, assembly files, or conflicting
..NET versions. None of these resolved my issue, only adding the
parameterless constructor did. Does anyone know why? Thanks.
-------------------------
using System;
using System.Xml;
using System.Collections;
using System.IO;
namespace WebControls.Common
{
/// <summary>
/// Summary description for DbSchema.
/// </summary>
public class DbSchema
{
private Database _database;
// Required constructor for serializing:
public DbSchema()
{
}
public DbSchema(Database database)
{
_database = database;
GetSchema();
}
public string DatabaseName
{
get{return _database.Name;}
set{_database.Name = value;}
}
protected void GetSchema()
{
// (...)
}
}
}