Reputation: 619
I've followed the steps on this page:
http://www.codeproject.com/Articles/295831/WCF-NET-4-0-Console-Hosted-Json-Rest-Secure-Http-W
To create a JSON web service using HTTPS and WCF 4.0. This all works perfectly in the console application.
I was trying to test some Jquery queries to the web service but was getting pretty irritated with all the restrictions with regards to cross-domain requests.
I therefore moved my web service to IIS and now it doesn't pick up my authentication. It won't authenticate with my custom auth provider. I found that I could type in my windows username and password, but then obviously the Identity is incorrect as it has the wrong username.
My security mode is Transport and clientCredentialType is Basic as per the link above.
After some searching I found this:
http://custombasicauth.codeplex.com/
Which looked promising, but after installing it I don't see the authentication provder in IIS at all. I'm using a 64-bit windows 7 system with .NET 4.0
Does anyone know how to get this working or if I should take a different approach?
All I'm wanting to end up with is a JSON web service where I authenticate once (don't have to send username / password with every JSON request) and can then send JSON requests to the web service while it still remembers which user is logged in.
Upvotes: 2
Views: 4519
Reputation: 3460
Here is the MSDN document explaining how to use the WCF Authentication Service: http://msdn.microsoft.com/en-us/library/bb386582.aspx. The documentation includes a walkthrough; it is lengthy, but I think it will help you get on the right track.
Upvotes: 1