System.IndexOutOfRangeException при открытии базы данных Perst - PullRequest
0 голосов
/ 07 февраля 2012

Мы используем Perst для Silverlight некоторое время, с хорошими результатами, но недавно мы получаем следующую ошибку при открытии базы данных:

System.IndexOutOfRangeException: [Arg_IndexOutOfRangeException]
Argumente: 
Debuggingressourcen-Zeichenfolgen sind nicht verfügbar. Oft enthalten der Schlüssel und die Argumente genügend Informationen zur Diagnose des Problems. Weitere Informationen erhalten Sie unterhttp://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=mscorlib.dll&Key=Arg_IndexOutOfRangeException
bei Perst.Impl.Bytes.unpack4(Byte[] arr, Int32 offs)
bei Perst.Impl.StorageImpl.loadStub(Int32 oid, Object obj, Type cls)
bei Perst.Impl.StorageImpl.loadObject(Object obj)
bei Perst.Persistent.Load()
bei Perst.Impl.ClassDescriptor.OnLoad()
bei Perst.Impl.StorageImpl.loadStub(Int32 oid, Object obj, Type cls)
bei Perst.Impl.StorageImpl.loadObject(Object obj)
bei Perst.Persistent.Load()
bei Perst.Impl.StorageImpl.reloadScheme()
bei Perst.Impl.StorageImpl.Open(IFile file, Int64 pagePoolSize)
bei Perst.Impl.StorageImpl.Open(String filePath, Int64 pagePoolSize)
bei Perst.Impl.StorageImpl.Open(String filePath)

Эта проблема, кажется, появляется при загрузке схемы дляследующий класс:

public class CompanyInfo : DomainEntity
{
   public string Iban
    {
        get;
        set;
    }

    public string Swift
    {
        get;
        set;
    }

    public string Vat
    {
        get;
        set;
    }

    public string AccountNumber
    {
        get;
        set;
    }

    public string ActiveManager
    {
        get;
        set;
    }

    public long? AttachmentMaxSize
    {
        get;
        set;
    }

    public string BackOfficeEmailAddress
    {
        get;
        set;
    }

    public string BankAddress
    {
        get;
        set;
    }

    public string BankCountry
    {
        get;
        set;
    }

    public string BankName
    {
        get;
        set;
    }

   public string City
    {
        get;
        set;
    }

    [Blob]
    public byte[] CompanyLogo
    {
        get;
        set;
    }

    public string CompanyLogoType
    {
        get;
        set;
    }

    public string Country
    {
        get;
        set;
    }

    public string County
    {
        get;
        set;
    }

    public Locale DefaultLocale
    {
        get;
        set;
    }

    public Guid? DefaultPaymentTermCustomer
    {
        get;
        set;
    }

    public short DefaultPriceAccuracy
    {
        get;
        set;
    }

    public Guid? DefaultPriceListGuid
    {
        get;
        set;
    }

    public string DistanceMetric
    {
        get;
        set;
    }

    public string EmailAddress
    {
        get;
        set;
    }

    public string EmailText
    {
        get;
        set;
    }

    public Dictionary<Locale, string> EmailTextTranslations
    {
        get;
        set;
    }

    public string Fax
    {
        get;
        set;
    }

    public string GeneralManager
    {
        get;
        set;
    }

    public string LocalCurrency
    {
        get;
        set;
    }

    public string Name
    {
        get;
        set;
    }

    public string PdfSmallText1
    {
        get;
        set;
    }

    public Dictionary<Locale, string> PdfSmallText1Translations
    {
        get;
        set;
    }

    public string PdfSmallText2
    {
        get;
        set;
    }

    public Dictionary<Locale, string> PdfSmallText2Translations
    {
        get;
        set;
    }

    public string Phone
    {
        get;
        set;
    }

    public string Phone2
    {
        get;
        set;
    }

    public string PrintingHeader
    {
        get;
        set;
    }

    public string State
    {
        get;
        set;
    }

    public string Street
    {
        get;
        set;
    }

    public int? TotalAccuracy
    {
        get;
        set;
    }

    public string Website
    {
        get;
        set;
    }

    public string ZipCode
    {
        get;
        set;
    }
}

Проблема появляется после загрузки свойства:

[Blob]
public byte[] CompanyLogo { get; set; }

Знаете ли вы, в чем может быть проблема?К сожалению, я не могу присоединить базу данных, но если вам нужно больше деталей, пожалуйста, дайте мне знать.

...