Ключевое слово в защите информации
КЛЮЧЕВОЕ СЛОВО
в защите информации
Получить ГОСТ TLS-сертификат для домена (SSL-сертификат)
Добро пожаловать, Гость! Чтобы использовать все возможности Вход или Регистрация.

Уведомление

Icon
Error

2 Страницы12>
Опции
К последнему сообщению К первому непрочитанному
Offline rnovoselsky  
#1 Оставлено : 12 сентября 2013 г. 0:13:35(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Добрый день.
При установке Центра идентификации в инструкции есть пункт:
Цитата:
Для функционирования Центра Идентификации необходимо получить сертификат подписи электронных идентификаторов. В качестве такого сертификата можно использовать самоподписанный сертификат большого срока действия.


Подскажите как и где его можно получить?
Сойдет самоподписанный.

Заранее спасибо!
Offline Андрей Писарев  
#2 Оставлено : 12 сентября 2013 г. 0:32:57(UTC)
Андрей *

Статус: Сотрудник

Группы: Участники
Зарегистрирован: 26.07.2011(UTC)
Сообщений: 12,612
Мужчина
Российская Федерация

Сказал «Спасибо»: 489 раз
Поблагодарили: 2032 раз в 1576 постах
Автор: rnovoselsky Перейти к цитате

Сойдет самоподписанный.


Техническую поддержку оказываем тут
Наша база знаний
Offline rnovoselsky  
#3 Оставлено : 26 сентября 2013 г. 12:23:54(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Поставил сертификат что получил выше, дал права, прописал его Thumbprint в Web.config.
Получаем:
Код:
Сервер электронной подписи - Ошибка




Во время работы приложения произошла ошибка.

Информация об ошибке:


The service '/STS/Active.svc' cannot be activated due to an exception during compilation. The exception message is: Exception has been thrown by the target of an invocation..



В логах:
Код:
WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/9040679
 Exception: System.ServiceModel.ServiceActivationException: The service '/STS/Active.svc' cannot be activated due to an exception during compilation.  The exception message is: The certificate key algorithm is not supported.. ---> System.NotSupportedException: The certificate key algorithm is not supported.
   at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
   at System.ServiceModel.Security.SecurityUtils.EnsureCertificateCanDoKeyExchange(X509Certificate2 certificate)
   at System.ServiceModel.Security.ServiceCredentialsSecurityTokenManager.CreateLocalSecurityTokenProvider(RecipientServiceModelSecurityTokenRequirement recipientRequirement)
   at System.ServiceModel.Security.ServiceCredentialsSecurityTokenManager.CreateSecurityTokenProvider(SecurityTokenRequirement requirement)
   at System.ServiceModel.Security.SymmetricSecurityProtocolFactory.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   --- End of inner exception stack trace ---
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp
 Process ID: 872


Что недоглядел?

Отредактировано пользователем 26 сентября 2013 г. 12:29:31(UTC)  | Причина: Не указана

Offline rnovoselsky  
#4 Оставлено : 26 сентября 2013 г. 12:30:09(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Обновил сообщение выше, не ту шибку вписал
Offline rnovoselsky  
#5 Оставлено : 26 сентября 2013 г. 13:07:55(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Переставил КриптоПро .NET стало лучше.
Теперь:
Код:
WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/5885002
 Exception: System.ServiceModel.ServiceActivationException: The service '/STS/Active.svc' cannot be activated due to an exception during compilation.  The exception message is: It is likely that certificate 'CN=cont_name1, E=test@cryptopro.ru' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail.. ---> System.ArgumentException: It is likely that certificate 'CN=cont_name1, E=test@cryptopro.ru' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail. ---> System.Security.Cryptography.CryptographicException: Keyset does not exist

   at CryptoPro.Sharpei.CPUtils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
   at CryptoPro.Sharpei.CPUtils.GetKeyPairHelper(CPCspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandleCP& safeProvHandle, SafeKeyHandleCP& safeKeyHandle)
   at CryptoPro.Sharpei.Gost3410CryptoServiceProvider.GetKeyPair()
   at CryptoPro.Sharpei.NetDetours.CPX509Certificate2.get_PrivateKey()
   at System.ServiceModel.Security.SecurityUtils.EnsureCertificateCanDoKeyExchange(X509Certificate2 certificate)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Security.SecurityUtils.EnsureCertificateCanDoKeyExchange(X509Certificate2 certificate)
   at System.ServiceModel.Security.ServiceCredentialsSecurityTokenManager.CreateLocalSecurityTokenProvider(RecipientServiceModelSecurityTokenRequirement recipientRequirement)
   at System.ServiceModel.Security.ServiceCredentialsSecurityTokenManager.CreateSecurityTokenProvider(SecurityTokenRequirement requirement)
   at System.ServiceModel.Security.SymmetricSecurityProtocolFactory.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at CryptoPro.Sharpei.ServiceModel.CPServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   --- End of inner exception stack trace ---
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp
 Process ID: 4116
Offline Андрей Писарев  
#6 Оставлено : 26 сентября 2013 г. 13:13:22(UTC)
Андрей *

Статус: Сотрудник

Группы: Участники
Зарегистрирован: 26.07.2011(UTC)
Сообщений: 12,612
Мужчина
Российская Федерация

Сказал «Спасибо»: 489 раз
Поблагодарили: 2032 раз в 1576 постах
Контейнер в хранилище Компьютера или Пользователя?
Служба не имеет доступа к контейнеру.
Техническую поддержку оказываем тут
Наша база знаний
Offline rnovoselsky  
#7 Оставлено : 26 сентября 2013 г. 13:57:05(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Автор: Андрей * Перейти к цитате
Контейнер в хранилище Компьютера или Пользователя?
Служба не имеет доступа к контейнеру.


Сертификат в контейнере компьютера, сертификат сформирован командами из сообщений выше.
Перевыпустил сретификат ошибка пропала.

Вопрос - что должно быть в разделе <microsoft.identityModel> <trustedIssuers>
<!--thumbprint - отпечаток сертификата, которому приложение доверяет -->

Я ставлю Центр идентификации отдельно, на отдельный сервер.

Отредактировано пользователем 26 сентября 2013 г. 14:34:06(UTC)  | Причина: Не указана

Offline rnovoselsky  
#8 Оставлено : 26 сентября 2013 г. 14:35:04(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

...
Код:

WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/8032798
 Exception: System.ServiceModel.ServiceActivationException: The service '/STS/Active.svc' cannot be activated due to an exception during compilation.  The exception message is: Exception has been thrown by the target of an invocation.. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Unable to find STS by thumbprint 'F9D570E8DF0553A6167BD7B3BFE11E2217780CDE'
 
Offline rnovoselsky  
#9 Оставлено : 26 сентября 2013 г. 20:24:47(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Переставил с нуля...

Проблему из сообщения выше решить пока не удалось, что может быть не так?
Код:
Exception: System.ServiceModel.ServiceActivationException: The service '/STS/Active.svc' cannot be activated due to an exception during compilation.  The exception message is: Exception has been thrown by the target of an invocation.. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Unable to find STS by thumbprint 'F9D570E8DF0553A6167BD7B3BFE11E2217780CDE'

Отредактировано пользователем 26 сентября 2013 г. 20:25:20(UTC)  | Причина: Не указана

Offline rnovoselsky  
#10 Оставлено : 26 сентября 2013 г. 21:29:29(UTC)
rnovoselsky

Статус: Активный участник

Группы: Участники
Зарегистрирован: 28.08.2013(UTC)
Сообщений: 31

Автор: rnovoselsky Перейти к цитате
Переставил с нуля...

Проблему из сообщения выше решить пока не удалось, что может быть не так?
Код:
Exception: System.ServiceModel.ServiceActivationException: The service '/STS/Active.svc' cannot be activated due to an exception during compilation.  The exception message is: Exception has been thrown by the target of an invocation.. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Unable to find STS by thumbprint 'F9D570E8DF0553A6167BD7B3BFE11E2217780CDE'

Проблема решена...
Что было:
1) Сертфиикат не переносился корректно в личные компьютера, перевыпустил сертификат с ключом -exportable
2) Сертификат создавался в пользовательских личных, перенес средствами CSP, заработало только после того как оставил его одного а остальные хранилища грохнул
3) Перепрописал Thumbnails в web.config
4) !!!Обновил!!! оснастку "Сертификаты", после чего добавил права для IIS AppPool\DSS_STSPool на хранилище

Пункт 4 оказался решающим, когда выдал права, обновил и зашел в права - там небыло IIS AppPool\DSS_STSPool

Отредактировано пользователем 26 сентября 2013 г. 21:30:03(UTC)  | Причина: Не указана

RSS Лента  Atom Лента
Пользователи, просматривающие эту тему
2 Страницы12>
Быстрый переход  
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.