Здравейте всички,
Пиша услуга в интернет сценарий. Трябва да внедря криптиране на съобщенията. Получих всичко, но когато преглеждам тази услуга от IIS, получавам следното изключение.
Грешка в сървъра в приложението „/MyTestService“.
Keyset не съществува
Описание: Възникна необработено изключение по време на изпълнението на текущата уеб заявка. Моля, прегледайте проследяването на стека за повече информация относно грешката и откъде произлиза в кода.
Подробности за изключение: System.Security.Cryptography.CryptographicException: Keyset не съществува.................................. ............................
....................................................................
Изглежда проблем със сертификата. Може ли някой да обясни как да се справя с нещата със сертификати и моля по-подробно. Само си помислете, че съм начинаещ в сертификатите.
<system.serviceModel>
<services>
<service name="Test.MyService" behaviorConfiguration="MyServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="MyTestService" binding="wsHttpBinding" bindingConfiguration="WebserviceHttpBinding" contract="Test.IMyService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="WebserviceHttpBinding">
<security mode="Message">
<message clientCredentialType="UserName" negotiateServiceCredential="false"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Test.CredentialValidator, Test"/>
<serviceCertificate findValue="RPKey" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/>
</serviceCredentials>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>