none
consuming AIF wcf basic service from Biztalk2010 RRS feed

  • Question

  • Hi,

    I am calling AIF WCF  Basci HTTP binding service from biztalk 2010

    I have keep the following settings:

    Right click biztalk project select add generated items then

    select consuming WCF Service then set the web service URL and click get button then meta data generated

    after 2 .xml files 2 .xsd files generated and one .odx file generated

    keep the necessary settings and import binding file at biz talk administration toll of my application

    then run the service it showing following error

    An error occurred while processing the message, refer to the details section for more information Message ID: {AEC0A3EF-D4AD-42A5-8BC0-5C0BB0130E9B}

    Instance ID: {84C0E0AB-32DF-4440-92EB-36C68E21E95A}

    Error Description: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)

       --- End of inner exception stack trace ---

     

    Server stack trace:

       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

     

    Exception rethrown at [0]:

       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)

       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

    Tuesday, March 27, 2012 1:25 PM

All replies

  • Does your BizTalk Inprocess User have access to call web service that you are trying to call. (At runtime this user will need permissions on web service). If it does not you have two options

    1) Get the permissions for BizTalk Inprocess host user

    OR

    2) You need credentials for the user who has permissions to call that service.


    Thanks With Regards,
    Shailesh Kawade
    MCTS BizTalk Server
    Please Mark This As Answer If This Helps You.
    http://shaileshbiztalk.blogspot.com/

    Wednesday, March 28, 2012 6:53 AM
  • could u give code for 2 option

    how to set credentials to user  when call AIF WCF service using Biztalk2010 orchesteration

    Wednesday, March 28, 2012 7:04 AM
  • You don't use an orchestration for calling a service, you use a Send Port. So most likely the credentials needs to be set up on the WCF Send port under the Security tab. If the Service require NTLM, use can choose Transport Security Mode and then Ntlm as credential type. This will also, as Shailesh pointed out, require that the user running the host instance used on the Send Port has the sufficent credentials on the Service.

    Morten la Cour

    Wednesday, March 28, 2012 7:41 AM
  • I am calling AIF web service using consume WCF Service when Right click biztalk application select add Generated Items.

    after it will generated .xsd files, .xml files and .odx file generated

    after create request-reponse port  to  call AIF web service

    deploy the biztalk application

    go to biztalk adminstratio  tool and select biztalk appliction then import binding file

    after send port is created

    open send port properties select security tab

    set security mode = Transportcredentials

    Transport creadential type = NTLM

    then run the application showing following error

    An error occurred while processing the message, refer to the details section for more information Message ID: {954FE501-EED1-48B0-A058-BC20EF817D4F}

    Instance ID: {CB4E1959-6F48-494C-87A0-595C69EE2059}

    Error Description: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Basic realm="192.168.1.66",Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)

       --- End of inner exception stack trace ---

     

    Server stack trace:

       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

     

    Exception rethrown at [0]:

       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)

       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

     

    Wednesday, March 28, 2012 8:25 AM
  • What is the security mode of the WCF service? Usually for this error you need to use securityMode = message or transportWithMessage and provide a credential.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline

    Friday, March 30, 2012 6:39 PM
    Moderator
  • mode is securityMode = message

    Monday, April 2, 2012 11:31 AM