我正在尝试启动并运行 iBoxDb,但是,当尝试打开连接时,我得到 ArgumentNullException。完全相同的代码在 Windows Phone 8.1 Silverlight上运行良好,但在 WP 8.1运行时不运行。我尝试传递路径参数而不是""
(的各种组合ApplicationData.Current.LocalFolder
),但仍然没有。
由于 iBoxDb 几乎没有文档,我真的没有想法:|
编码:
...
private readonly AutoBox _db;
public iBoxDbRepository()
{
var server = new DB(1, "", true);
_db = server.Open();
}
...
堆栈跟踪:
System.ArgumentNullException occurred
_HResult=-2147467261
_message=Value cannot be null.
HResult=-2147467261
IsTransient=false
Message=Value cannot be null.
Parameter name: path1
Source=mscorlib
ParamName=path1
StackTrace:
at System.IO.Path.Combine(String path1, String path2)
at System.IO.IsolatedStorage.IsolatedStorageFile.FetchOrCreateRoot()
at System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStore(String group, String id)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication()
at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.GetIsolatedStorageFile()
at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.CreateIsolatedStorageFileStream(String path, StreamAccess access)
at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.CreateStream(String path, StreamAccess access)
at q..ctor(String A_0, DatabaseConfig A_1, IBoxRecycler A_2)
at er.a(DatabaseConfig A_0, String A_1, IBoxRecycler A_2)
at ac..ctor(Int64 A_0, String A_1, DatabaseConfig A_2, IBoxRecycler A_3)
at iBoxDB.LocalServer.LocalDatabaseServer.a(String A_0, Int64 A_1)
at iBoxDB.LocalServer.LocalDatabaseServer.GetInstance(Int64 address)
at iBoxDB.LocalServer.DB.Open(Int64 destAddr)
at Budget.Data.iBoxDbRepository..ctor()
at lambda_method(Closure )
at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistrationBase'1.CreateInstanceWithNullCheck()
at System.Lazy'1.CreateValue()