A problem occurred during decryption of the payload

Mar 3, 2008 at 9:43 PM
I getting alittle further with the Patient Register sample and I believe I found the issue.

The public/private don't match: The PRPublicKey.xml doesn't match the public key stored in the serviceprovider publickey columns. The PRPublicKey.xml, PRPrivateKey and the privateKey column should be generated from the same key set.

I update the serviceprovider table to have the publickey the stored in the PRPublicKey.xml file, buty I'm still receiving an error.

Can I get the correctly certificates and step to set them up so I can get the patientRegister working.

To date I have only have been able to get the ServiceProviderRegister and ServiceProviderRegisterAdmin working. All the other samples are missing pieces that make it unusable.

Below is how I have the web.config setup for the PatientRegisterWS:
<appSettings>
<add key="ConnectionEngine.WebServiceURL" value="http://CONNECTDEV/RoutingServices/ConnectionEngineAdapter.asmx" />
<add key="ConnectionEngine.UserName" value="" />
<add key="ConnectionEngine.Password" value="" />
<add key="serviceProviderRegister.ServiceProviderID" value="101"/>
<add key="ServiceProviderRegister.PublicKey" value="Bin\SPRPublicKey.xml"/>
<add key="serviceProviderRegister.EncryptionType" value="TripleDES"/>
<add key="SystemAdapter.ServiceProviderID" value="117"/>
<add key="SystemAdapter.WebServiceURL" value="" />
<add key="SystemAdapter.EncryptionType" value="TripleDES"/>
<!-- <add key="SystemAdapter.PubliceKey" value="Bin\PRPublicKey.xml"/> -->
<add key="SystemAdapter.PrivateKey" value="Bin\PRPrivateKey.xml"/>
<add key="SystemAdapter.MessageHandlerList" value="Bin\PRMessageHandlers.xml"/>
<add key="SystemAdapter.ClientCertificateName" value=""/>
</appSettings>

Developer
Mar 3, 2008 at 11:07 PM
Hey Gary,

Two things to look at here:

1) Make sure that PrPublicKey.xml matches PRPrivateKey.xml.
2) Make sure that the contents of PRPublicKey.xml matches the values for ServiceProviderRegister ID 117 on the ServiceProviderRegister database
3) Make sure that the contents of SPRPublicKey.xml matches the values for ServiceProviderRegister ID 101 on the ServiceProviderRegister database

Make sure that the following files can be read by the your ConnectionEngineAppPool user:

SPRPublicKey.xml
PRPublicKey.xml
PRPrivateKey.xml
PRMessageHandlers.xml

I hope this helps.

Cheers, Wagner.


ggallagher wrote:
I getting alittle further with the Patient Register sample and I believe I found the issue.

The public/private don't match: The PRPublicKey.xml doesn't match the public key stored in the serviceprovider publickey columns. The PRPublicKey.xml, PRPrivateKey and the privateKey column should be generated from the same key set.

I update the serviceprovider table to have the publickey the stored in the PRPublicKey.xml file, buty I'm still receiving an error.

Can I get the correctly certificates and step to set them up so I can get the patientRegister working.

To date I have only have been able to get the ServiceProviderRegister and ServiceProviderRegisterAdmin working. All the other samples are missing pieces that make it unusable.

Below is how I have the web.config setup for the PatientRegisterWS:
<appSettings>
<add key="ConnectionEngine.WebServiceURL" value="http://CONNECTDEV/RoutingServices/ConnectionEngineAdapter.asmx" />
<add key="ConnectionEngine.UserName" value="" />
<add key="ConnectionEngine.Password" value="" />
<add key="serviceProviderRegister.ServiceProviderID" value="101"/>
<add key="ServiceProviderRegister.PublicKey" value="Bin\SPRPublicKey.xml"/>
<add key="serviceProviderRegister.EncryptionType" value="TripleDES"/>
<add key="SystemAdapter.ServiceProviderID" value="117"/>
<add key="SystemAdapter.WebServiceURL" value="" />
<add key="SystemAdapter.EncryptionType" value="TripleDES"/>
<!-- <add key="SystemAdapter.PubliceKey" value="Bin\PRPublicKey.xml"/> -->
<add key="SystemAdapter.PrivateKey" value="Bin\PRPrivateKey.xml"/>
<add key="SystemAdapter.MessageHandlerList" value="Bin\PRMessageHandlers.xml"/>
<add key="SystemAdapter.ClientCertificateName" value=""/>
</appSettings>


Mar 4, 2008 at 7:26 PM

Now I'm receiving this error again.
"Source and Destination Service Providers not in the same pool"

101, 102 and 117 are in the same pool (1).

Test application (Test.exe) that included with the patientregister project, I have the following in the app.config file;


<appSettings>
<add key="PatientRegister.ServiceProviderID" value="117"/>
</appSettings>


The PatientRegisterWS I have the following in the web.config:

<appSettings>
<add key="ConnectionEngine.WebServiceURL" value="http://CONNECTDEV/RoutingServices/ConnectionEngineAdapter.asmx" />
<add key="ConnectionEngine.UserName" value="" />
<add key="ConnectionEngine.Password" value="" />
<add key="serviceProviderRegister.ServiceProviderID" value="101"/>
<add key="ServiceProviderRegister.PublicKey" value="Bin\SPRPublicKey.xml"/>
<add key="serviceProviderRegister.EncryptionType" value="TripleDES"/>
<add key="SystemAdapter.ServiceProviderID" value="117"/>
<add key="SystemAdapter.WebServiceURL" value="" />
<add key="SystemAdapter.EncryptionType" value="TripleDES"/>
<add key="SystemAdapter.PubliceKey" value="Bin\PRPublicKey.xml"/>
<add key="SystemAdapter.PrivateKey" value="Bin\PRPrivateKey.xml"/>
<add key="SystemAdapter.MessageHandlerList" value="Bin\PRMessageHandlers.xml"/>
<add key="SystemAdapter.ClientCertificateName" value=""/>
</appSettings>

I verified that the ConnectionEngineAppPool is able to read the key files:
SPRPublicKey.xml
PRPublicKey.xml
PRPrivateKey.xml
PRMessageHandlers.xml

And all the public/private keys do match.

I'm stumped, I find it hard to believe the anybody else ever had the patient register test application running.

I had to do allot configure it correctly and it still doesn't work.

I noticed there another service provider 118 being reference for the patientregisterWS, but I don't see any examples this adapter.

The Test.exe that comes with the PatientRegister only make a web-service call to the PatientRegisterWS.