0

We are consuming WCF service from a console application with NetworkCredential(UserName && PWD) ,WSHTTPBinding.

When we call Service from Azure PAAS Service , we land into issue The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'.

The Client Config for both PAAS Consumer, Console app looks exactly same. Not sure why the error is seen only in case of PAAS Consumer.

  • There is a similar issue in this link, you can refer to it: https://stackoverflow.com/questions/15570108/the-http-request-is-unauthorized-with-client-authentication-scheme-negotiate – Ding Peng May 03 '21 at 02:01

1 Answers1

0

The reason is because the PaaS service is not in the same network of your WCF service or the credentials you're using are not valid.

For example:

you're using a valid / existing credential from your company network locally:

CONTOSO\thdotnet

When publishing to Azure and trying to use the same credentials it will fail unless you're using a VPN to allow your PAAS app to call the servers running in your company's network.

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Console application worked in these scenarios 1) I tested the Console app by disabling the VPN .It worked. 2) Created a Virtual Machine in Azure , copied the console app . It worked there also . Only in Azure App Service , the problem is seen which I am not able to figure out – Suresh Gubba May 02 '21 at 06:54
  • App Service runs on top of IIS (for Windows). Take a look in here: https://stackoverflow.com/questions/5427730/wcf-iis-windows-authentication – Thiago Custodio May 02 '21 at 15:46