2015-01-20 11 views
0

iBoxDb를 실행하려고하는데 연결을 열려고하면 ArgumentNullException이 발생합니다. 정확한 코드는 Windows Phone 8.1 Silverlight에서 제대로 작동하지만 WP 8.1 런타임에서는 작동하지 않습니다. "" (다양한 조합은 ApplicationData.Current.LocalFolder) 대신 경로 매개 변수를 전달하려고했으나 아무 것도 전달하지 않았습니다.iBoxDb 연결을 열려고하면 ArgumentNullException이 발생합니다.

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()

+0

Path.Combine (Windows.Storage.ApplicationData.Current.LocalFolder.Path, "my.db"); ' – Fred

+0

예, 아쉽게도 아무것도 변경하지 않았습니다. ( – Domas

답변

1

IsolatedStorageFile.FetchOrCreateRoot은()에 매개 변수가없는, 아무 것도 할 수 없다. WP 8.1 런타임은 다른 IO API를 사용하고 새 DatabaseConfig를 구현하거나 iBoxDB를 업데이트 한 다음 'WSDatabaseConfig'를 사용합니다.

관련 문제