Menu

IniDocument intilization fails

Help
adlbtt
2012-02-02
2013-04-22
  • adlbtt

    adlbtt - 2012-02-02

    when i try to rune code IniDocument initialization fails and throw an error like as follows

    System.FormatException was caught
      Message=String was not recognized as a valid DateTime.
      Source=mscorlib
      StackTrace:
           at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
           at System.DateTime.Parse(String s)
           at Nini.Ini.IniDocument.ValidateUsage()
           at Nini.Ini.IniDocument..ctor(String filePath)
           at NP2012.LicenseHandler.ReadSerialNumber() in D:\AgiloSoft\NP2011Build\NP2011Build\NP2011\LicenseHandler.vb:line 249
      InnerException:

    This type of Exception has been generated my code as follows

    Dim Ini As IniDocument = New IniDocument(IniFileName)

    In the above object  i give ini file path but it doesn't run and throw above Error I don't know why it is. To check that error I have made object of empty contructor as follows

    Dim Ini As IniDocument = New IniDocument()

    but still it is throwing the same error.

    Please help me out to get out of this.

    Thanks………

     
  • Brent R. Matzelle

    What version of Nini are you using?  There is no "ValidateUsage" method and there isn't any date parsing either.  Is this a fork or something? 

     

Log in to post a comment.

MongoDB Logo MongoDB