2014-10-27 105 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