Esta semana estaba intentando consumir un servicio web que tiene un certificado digital, cuando intente agregar la referencia me apareciĂł la siguiente advertencia:
Después de pasar por alto esta advertencia se me presento el siguiente error:
There was an error downloading ‘XXXXâ. The operation has timed out Metadata contains a reference that cannot be resolved: âXXXX’.
The HTTP request to ‘XXXX’ has exceeded the allotted timeout of 00:04:59.9020000. The time allotted to this operation may have been a portion of a longer timeout. The request was aborted: The request was canceled. If the service is defined in the current solution, try building the solution and adding the service reference again.
Intente revisar la WSDL del servicio desde IE y me apareciĂł el siguiente mensaje:
Al verificar el certificado digital este mostraba el siguiente error:
Buscando un poco acerca del origen de este error, encontrĂ© que se debe a una polĂtica de seguridad de Microsoft, la cual bloquea cualquier certificado que tenga una clave pĂșblica con una longitud menor a 1024 bits, debido a la vulnerabilidad que estas presentan.
Lo recomendado es utilizar una clave con una longitud mayor, pero en el caso de que se tenga un certificado con una longitud menor y no haya la posibilidad de cambiarlo se puede saltar esta polĂtica ejecutando el siguiente comando:
certutil -setreg chain\minRSAPubKeyBitLength 512
Al ejecutar este comando se soluciona el problema y se puede acceder al certificado digital del servicio.
Si desean restablecer la polĂtica se debe ejecutar el siguiente comando:
certutil -delreg chain\MinRsaPubKeyBitLength
MĂĄs informaciĂłn: