2014-10-27 56 views
1

我正在使用CRM SDK 2013中的插件註冊工具。創建到CRM 2013 Online的新連接時,出現錯誤:「無法連接到CRM組織」。具體如下:CRM 2013插件註冊連接錯誤:無法連接到CRM組織

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. 
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmServerLoginControl.StartConnectCheck() 
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
    at System.Windows.Controls.Button.OnClick() 
    at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) 
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
    at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) 
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) 
    at System.Windows.Input.InputManager.ProcessStagingArea() 
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) 
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
    at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) 
    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) 
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 
    at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 
    at System.Windows.Window.ShowHelper(Object booleanBox) 
    at System.Windows.Window.ShowDialog() 
    at Microsoft.Crm.Tools.PluginRegistration.MainViewModel.CreateConnections() 

即使我點擊沒有用戶名和密碼的登錄,該錯誤也會顯示。

我試着在C:\ Users \\ LiveDeviceID文件夾中刪除LiveDevice.xml和LiveDeviceID.xml,但沒用。

讚賞任何想法或解決方法。提前致謝!

更新:我嘗試了SDK 2011中的註冊工具,它以某種方式可以成功連接。但是,我無法調試我的插件,因爲datacontract解析,我只能註冊/取消註冊插件。

回答

3

好吧,我得到這個工作通過刪除以下AppData文件夾,因爲我在插件註冊工具日誌文件中出現拒絕訪問錯誤。 C:\用戶{用戶名} \應用程序數據\漫遊\微軟\ PluginRegistration。

+0

謝謝。這可能會解決這個問題。現在我正在繼續使用CRM 2015,新的註冊工具正常工作。 – Khoait 2016-07-07 08:49:22