1

I am using ajax to call a wcf service in backend. Backend has windows authentication. It works fine in IE but it is not working in Google Chrome. It says the error is "Unauthorized" with status code of 401.

How to send the authentication details along with the ajax call?

Thank you.

Aditya T
  • 90
  • 1
  • 5
  • see if [this](http://stackoverflow.com/questions/1002179/how-can-i-pass-windows-authentication-to-webservice-using-jquery) helps, Check the second answer in the post. – Anu Jun 26 '13 at 08:53
  • Hi, I tried that. It didn't help :( – Aditya T Jun 26 '13 at 09:11
  • Debugger in chrome says Access-Control-allow-origin is true and can't do it. I am doing a cross domain ajax call. So i set the parameter to * (asterisk) – Aditya T Jun 26 '13 at 09:14

1 Answers1

0

One way you can do it if you have a secure website is to put the username and password in the URL of your web service.

For example:

https://username:password@mywebsite.com/webservice.svc/

seabass2020
  • 1,093
  • 14
  • 12