Ubuntu Mono System.NullReferenceException:对象引用未设置为对象的实例

时间:2013-12-03 09:58:45

标签: ubuntu mono

我为我的KeePass使用KeeSkyDrive插件,它在我的PC上运行良好。但是在Ubuntu 12.04,Mono 2.10.8.1上不能与Portable Keepass 2.24一起使用。 单击“授权”按钮时,将返回“KeeSkyDrive授权错误”,如下所示:

  

System.NullReferenceException:未将对象引用设置为对象的实例   at system.windows.Forms.WebBrowser.Navigate(System.String urlString)[0x00000] in:0

     

at(wrapper remoting-invoke-with-check)System.Windows.Forms.WebBrowser:Navigate(string)

     

在KeeSkyDrive.AuthenticationForm.Authenticate(System.String url,System.String targetUrl,IWin32Window所有者)[0x00000] in:0

     

在KeeSkyDrive.LiveConnection.GetAuthorizationCode(System.String []范围,IWin32Window所有者)[0x00000] in:0

     

在KeeSkyDrive.LiveConnection.Authorize(System.String [] scopes,Boolean implicitGrant,IWin32Window owner)[0x00000] in:0

     

在KeeSkyDrive.OptionsForm.AuthorizeClick(System.Object sender,System.EvenArgs e)[0x00000] in:0

sourceforge上插件的源代码:http://sourceforge.net/p/keeskydrive/code/ci/master/tree/

以下是我粘贴的崩溃代码:

public static string Authenticate(string url, string targetUrl, IWin32Window owner)
    {
        using (var form = new AuthenticationForm())
        {
            form.targetUrl = targetUrl;
            form.targetUrl = url;
            form.webBrowser.Navigate(url);
            var result = form.ShowDialog(owner);
            return result == DialogResult.OK ? form.webBrowser.Url.OriginalString : null;
        }
    }

请帮助修改在ubuntu上运行的插件代码?感谢。

0 个答案:

没有答案