SSIS Certificate Authentication : The request failed with HTTP status 403: Forbidden..

  • Hi All

    I have an SSIS package to consume a Web Service. This Web Service needs a digital certificate installed to the Personal Store.

    I have installed the certificate, tested the web service by calling it thru IE, every thing is working.

    I can also create a HTTP Connection through SSIS and can select and use the

    correct certificate and can test the connection successfully.

    Problem is when I run the SSIS it gives me following error.

    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution.

    The error is: The request failed with HTTP status 403: Forbidden..

    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)

    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)

    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

  • I thought this is a permission issue, SSIS is running under particular user or machine account and that account does not have access to the certificate in the personal account of the current logged in user (by running I mean running by hitting play button not deploying and running thru a job), then I wrote this script in the script task and press play button. I actually shows me name of all the certificate I have in the store. It means SSIS can access the certificates?

    Public Sub Main()

    ' Add your code here

    'Instantiate the Store / The store name is My, location is current user store

    Dim store As New X509Store("MY", StoreLocation.CurrentUser)

    'Open the stor

    store.Open(OpenFlags.ReadWrite)

    'Use the X509CertificateCollection class to get the certificates from the my store into a collection

    Dim collection As X509Certificate2Collection = CType(store.Certificates, X509Certificate2Collection)

    'Declare x509 as the certificate object

    Dim x509 As New X509Certificate2

    'Loop through the certificates in the store, one by one

    '------------

    For Each x509 In collection

    'Show the thumbprint for each certificate in the users store

    MsgBox(x509.SubjectName.Name)

    'Code here to analyze whether certificate is exportable or not

    Next x509

    store.Close()

    Dts.TaskResult = Dts.Results.Success

    End Sub

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply