Authentication Test Servers

httpbin.org has public endpoints for HTTP Basic and Digest Authentication (in each example, replace :user and :passwd with the test values you’d like to check against – :qop, too, for Digest): /basic-auth/:user/:passwd Challenges HTTPBasic Auth. /hidden-basic-auth/:user/:passwd 404’d BasicAuth. /digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth. Each endpoint is available in both HTTP and HTTPS.

Using Fiddler to sniff Visual Studio 2013 requests (proxy firewall)

If you want to look at the traffic with Fiddler, you probably want to go the route of changing the machine.config file so that all .NET applications will send traffic through Fiddler. This helps ensure that you capture data from processes running in services, etc. Open machine.config in the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config. Note that if you … Read more

The HTTP request is unauthorized with client authentication scheme ‘Ntlm’ The authentication header received from the server was ‘NTLM’

Visual Studio 2005 Create a new console application project in Visual Studio Add a “Web Reference” to the Lists.asmx web service. Your URL will probably look like: http://servername/sites/SiteCollection/SubSite/_vti_bin/Lists.asmx I named my web reference: ListsWebService Write the code in program.cs (I have an Issues list here) Here is the code. using System; using System.Collections.Generic; using System.Text; … Read more

401 response for CORS request in IIS with Windows Auth enabled

You can allow only OPTIONS verb for anonymous users. <system.web> <authentication mode=”Windows” /> <authorization> <allow verbs=”OPTIONS” users=”*”/> <deny users=”?” /> </authorization> </system.web> According W3C specifications, browser excludes user credentials from CORS preflight: https://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#preflight-request

NPM behind NTLM proxy

I solved it this way (OS: Windows XP SP3): 1. Download CNTLM installer and run it. 2. Find and fill in these fields in cntlm.ini. Do not fill in the Password field, it’s never a good idea to store unencrypted passwords in text files. Username YOUR_USERNAME Domain YOUR_DOMAIN Proxy YOUR_PROXY_IP:PORT Listen 53128 3. Open console, … Read more

Unable to get windows authentication to work through local IIS

You have to whitelist a domain specified in the hosts file in order for windows authentication to work: Click Start, click Run, type regedit, and then click OK. In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters Right-click Parameters, click New, and then click DWORD (32-bit) Value. Type DisableStrictNameChecking and press ENTER. Double-click the DisableStrictNameChecking … Read more

WCFTestClient The HTTP request is unauthorized with client authentication scheme ‘Anonymous’

I didn’t have control over the security configuration for the service I was calling into, but got the same error. I was able to fix my client as follows. In the config, set up the security mode: <security mode=”TransportCredentialOnly”> <transport clientCredentialType=”Windows” proxyCredentialType=”None” realm=”” /> <message clientCredentialType=”UserName” algorithmSuite=”Default” /> </security> In the code, set the proxy … Read more

How can I check if my IIS site is using NTLM or Kerberos?

From: Determine if HTTP authentication is NTLM or Kerberos http://support.microsoft.com/kb/891032 […] “Since we are looking over this trace to see if the client is sending authentication information, we can use the TCP segments to track the HTTP GET requests and the response from the server. Here is a snippet from the frame that sends authentication … Read more

How do you find out if Active Directory is using Kerberos or NTLM?

I think question should be twisted on its head. Active Directory supports both Kerberos and NTLM. Windows will first try Kerberos and if all requirements are not met it will fallback to NTLM. I will give you example, accessing file share by name like \server1\share would invoke Kerberos and should succeed given proper permision. But … Read more