0
Naprawione

Ошибка при попытке войти в Опции

Vnovikov2008 12 lat temu Ostatnio zmodyfikowane przez Andrej Repin 12 lat temu 3

Я так понял что обновлять его надо через меню Options. При нажатии на кнопку Options в выпадающем меню появляется ошибка: Возникло необработанное исключение. Ключ не может быть использован в указанном состоянии.

Подробно:
System.Security.Cryptography.CryptographicException: Ключ не может быть использован в указанном состоянии.

в System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
в Fb2Library.Config.RecentUserCredentialsElement.get_PlainTextPassword()
в Fb2Library.MainWindow.GuessUserInfo(RecentUserCredentialsElement userCredentials, FbConnectionStringBuilder builder)
в Fb2Library.MainWindow.Authenticate(String databaseId, Boolean force, FbConnectionStringBuilder builder)
в Fb2Library.MainWindow.OpenDatabase(FbConnectionStringBuilder builder)
в Fb2Library.MainWindow.OpenDatabaseFile(String filename)
в Fb2Library.MainWindow.OpenFile(String filename)
в Fb2Library.MainWindow.<recentList_SelectionChanged>b__48()
в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

А вот другая, но тоже при попытке в то же меню попасть:
System.ComponentModel.Composition.CompositionException: При объединении возникла одна ошибка объединения. Основная причина изложена ниже. Просмотрите свойство CompositionException.Errors для получения дополнительных сведений.

1) Ключ не может быть использован в указанном состоянии.


Результат: Произошло исключение при вызове метода "OnImportsSatisfied" для типа "Fb2Library.Options.NetworkOptionsPage".

Результат: Невозможно активизировать элемент типа "Fb2Library.Options.NetworkOptionsPage".
Элемент: Fb2Library.Options.NetworkOptionsPage --> Fb2Library.Options.NetworkOptionsPage --> AssemblyCatalog (Assembly="Fb2Library, Version=1.0.342.1, Culture=neutral, PublicKeyToken=null")

Результат: Не удается получить экспорт "Fb2Library.Options.NetworkOptionsPage (ContractName="System.Windows.Controls.Page")" из части "Fb2Library.Options.NetworkOptionsPage".
Элемент: Fb2Library.Options.NetworkOptionsPage (ContractName="System.Windows.Controls.Page") --> Fb2Library.Options.NetworkOptionsPage --> AssemblyCatalog (Assembly="Fb2Library, Version=1.0.342.1, Culture=neutral, PublicKeyToken=null")

Результат: Произошло исключение при вызове метода "OnImportsSatisfied" для типа "Fb2Library.Options.OptionsDialog".

Результат: Невозможно активизировать элемент типа "Fb2Library.Options.OptionsDialog".
Элемент: Fb2Library.Options.OptionsDialog --> Fb2Library.Options.OptionsDialog

в System.ComponentModel.Composition.CompositionResult.ThrowOnErrors(AtomicComposition atomicComposition)
в System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
в System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
в Fb2Library.MainWindow.ShowOptionsCommand_Executed(Object sender, ExecutedRoutedEventArgs e)
в System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
в System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
в System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
в System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
в System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
в System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
в System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
в System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
в System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
в System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
в MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
в System.Windows.Controls.Primitives.ButtonBase.OnClick()
в System.Windows.Controls.Button.OnClick()
в System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
в System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
в System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
в System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
в System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
в System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
в System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
в System.Windows.Input.InputManager.ProcessStagingArea()
в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
в System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
в System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


Что это??

Odpowiedź

Odpowiedź
Naprawione
Ошибка, Сэр!

Систему переустанавливали и/или копировали конфигурационный файл с другого компьютера?
Программа шифрует пароли уникальным для каждой системы ключом, и поэтому конфигурационный файл с одного компьютера нельзя использовать на другом.

Для восстановления работоспособности удалите из конфигурационного файла вместе с содержимым секции <RecentUserCredentials> и <NetworkConfig>

UPD: Добавлена обработка CryptographicException
Odpowiedź
Naprawione
Ошибка, Сэр!

Систему переустанавливали и/или копировали конфигурационный файл с другого компьютера?
Программа шифрует пароли уникальным для каждой системы ключом, и поэтому конфигурационный файл с одного компьютера нельзя использовать на другом.

Для восстановления работоспособности удалите из конфигурационного файла вместе с содержимым секции <RecentUserCredentials> и <NetworkConfig>

UPD: Добавлена обработка CryptographicException

Не не не... все изначально жило тут. Это ноут и систему тоже не трогал ни кто. Вот скопировать из одного места в другое в пределах харда наверное мог, не помню...

А конфигурационный файл это кто и где???

Это тут %LOCALAPPDATA%\Gremlin\Fb2Library\Local.config

Спасибо, все получилось.