0

I am trying to secure an https post service through a username/password authentication (Basic authentication). But so far I am not able to figure out how I can secure my service on the server side and force the username/password combination for the clients. I get that using httpclienthandler/httpclient/networkcredentials you can access the server, but how to force it on the server side and send appropriate unauthorized access errors etc.

Any directions or links using C#?

thecoder
  • 1
  • 2
  • possible duplicate of [what is the best way to make some pages in asp.net require login?](http://stackoverflow.com/questions/477607/what-is-the-best-way-to-make-some-pages-in-asp-net-require-login) – oleksii Aug 27 '15 at 22:49
  • See [this](http://stackoverflow.com/questions/4334521/c-sharp-httpwebrequest-using-basic-authentication) post for good info – F. Stephen Q Aug 28 '15 at 17:29
  • thank you for the posts. I actually kind of know and have used before on connecting to a secure service that requires username/password. the problem I am finding it hard is the other way around. how do I verify/authenticate the user? where is the password/username passed through, how do I get them from the http request etc – thecoder Sep 01 '15 at 23:37

1 Answers1

0

It seem there is the AuthenticationFilter, what I was looking for.. Here is a good amount of detail here;

thecoder
  • 1
  • 2