-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IndexOutOfRangeException when trying to open DB with password #1504
Comments
Hi @panthernet, can you paste your stacktrace? |
Here you go
|
And this is for the ticks exception
|
same error here
|
Ok, I found a bug in ConnectionString parser, when finalize with |
Got the same error:
My DB does not have any passwords set. |
@alex-fomin Could you provide your datafile and the connection string you're using? |
The datafile is pretty big (73Mb): https://www.dropbox.com/s/5agkno8ikr2mb2t/ProcessingQueue.db?dl=0 |
@alex-fomin The file you sent appears to be a SQLite datafile. |
I believe the same issue is with $ character. While interpolating some strings I mistyped the name of the DB and got the same error.
|
I have a similar scenario. System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. DB is located in C:\Users<username>\AppData\Roaming<publisher><feature>\Autosave.db The user in question installed the application, and on the first-run - the DB was generated, not long after opening the app, the app performs a GetAll on a collection in the DB - the GetAll call triggered the exception. I have a copy of the DB and I get the same issue if I try to use my app to access the data. For the user - deleting the DB that was originally created and letting the app create a new one resolved the issue. |
I have the same problem described by @alex-nicholas |
Hi, I'm following the v5 guide but stuck with the System.IndexOutOfRangeException exception when I try to access the database with the password. Here's the code, .NET Core 3.1.
var str = $"Filename={path};Password='{verylongpwd}'"; using var db = new LiteDatabase(str);
The string sample is:
Filename=C:\Users\yup\AppData\Roaming\corex\storecore.file;Password='1495c305c5312dd1a9a18d9502daa0369216763ca7a6f537ddbe290241cf8aad1ca326313adec74bb98d1955747347cf0e3f087899d8bb2e0aa002ff825e1c0f25eaa79e5dfbf1c0e2daf6746a3a3f140244b764204c20c0ccede3521eaf8537ae32d4b13a04f1c387f56a8d6fa095bc53451c1892a46b8182afd94559cd7377aebc8d4a2b4883c637a359e6e67e1d8c2d789721351ebb000409329b2e875d21278b7c76724c68729e53dac50168564b8c3432018212a111c952e593829b42c296458cc0020174aaef9ca6b5661ca965004404c2bbb256bc41a8aa5c5349c615e40328a3263c45e5f96e61048149e98aa8b6f2afb59d73379e1dce5429752d8d'
If I add ; to the end of the string, I get
System.ArgumentOutOfRangeException: 'Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. (Parameter 'ticks')'
It is very confusing for the moment.
The text was updated successfully, but these errors were encountered: