locked
SSIS and CRM 4.0 RRS feed

  • Question

  • Hello everybody,

    I'm Yesenia, new in this blog and also CRM and I'am trying to integrate CRM using SQL integration Services (SSIS) such as this page: http://blogs.msdn.com/crm/archive/2008/05/07/integrating-crm-using-sql-integration-services-ssis.aspx, when i tried this solution, I get the error described below. I don't know what's wrong.

    Can you help me please? Thanks

    Script Component: Runtime Error:-

    --------------------------------

    Script Component has encountered an exception in user code:

    Project name: SC_d7c1f95c7a6a4049a6cfeec1b58e20a0

    The request failed with HTTP status 401: Unauthorized.

    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

      at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

      at CRM.Proxy.CrmSdk.CrmService.Create(BusinessEntity entity)

      at ScriptMain.Input0_ProcessInputRow(Input0Buffer Row)

      at UserComponent.Input0_ProcessInput(Input0Buffer Buffer)

      at UserComponent.ProcessInput(Int32 InputID, PipelineBuffer Buffer)

      at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)

    So Plz anybody Help me.....

    Thank in advance

    Sunday, January 24, 2010 7:52 PM

Answers

  • Two other things to check:
    1. Is the server setup to use AD authentication ? If it is not, then you will need to use the CrmDiscoveryService to get a CrmTicket - see the CRM SDK for the code for this
    2. How are you running the SSIS package, and what AD account is it running under ? The code you use requires that the account the package runs under is a valid CRM user
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Monday, January 25, 2010 8:46 PM
    Moderator

All replies

  • Have you changed following lines:

    Service = New CrmService()
    Service.Credentials = System.Net.CredentialCache.DefaultCredentials
    Service.Url = "http://localhost:5555/MSCrmServices/2007/CrmService.asmx"
    Dim token As New CrmAuthenticationToken()
    token.OrganizationName = "MicrosoftCRM"
    Service.CrmAuthenticationTokenValue = token
    Service.PreAuthenticate = True
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Sunday, January 24, 2010 9:52 PM
    Moderator
  • Yes, i changed those lines with the  server name and the organization name.

    Monday, January 25, 2010 2:54 AM
  • Two other things to check:
    1. Is the server setup to use AD authentication ? If it is not, then you will need to use the CrmDiscoveryService to get a CrmTicket - see the CRM SDK for the code for this
    2. How are you running the SSIS package, and what AD account is it running under ? The code you use requires that the account the package runs under is a valid CRM user
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Monday, January 25, 2010 8:46 PM
    Moderator