.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Problem with digest authentication on IIS 5.1

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :WCF


I have WCF service on IIS 5.1 with active digest authentication (service and client are in windows domain).

Realm in IIS config window is set to: mydomain.site

Config file from service:

<transport clientCredentialType="Digest" proxyCredentialType="None" realm="mydomain.site" />

Config file from client is the same:

<transport clientCredentialType="Digest"  

View Complete Post

More Related Resource Links

Bizzare behavior of Digest authentication with HttpListener.


While trying to use Digest authentication with HttpListener, I expected it to act fairly close to how Basic does. Basic works fine with no surprises. With Digest, however: 

  1. HttpListener/http.sys driver takes on itself to authenticates user, without even passing request to my code (listener.GetContext() never gets unblocked) so ASP.NET application never has a chance to authenticate the user. I can see responses generated by "Microsoft-HTTPAPI/2.0" with WWW-Authenticate headers. I thought application should have a chance to authenticate the request with Digest user identity in the header. Is it possible to do?
  2. While insisting on Digest-authenticating users on its own, "Microsoft-HTTPAPI/2.0"/HttpListener/http.sys successfully authenticates domain users, but not computer users. I tried user name that includes computer name, realm name, computer name in the FQDN format - nothing works. Why such inconsistency?

Thank you,


Forms Authentication - IE problem

Hi folks,I already implemented some kind of Forms Authentication. I got the following problem - When I'm using IE(7, 8) ONLY (FF, Opera, Chrome - they are OK) it is impossible to to get logged and get redirect to specified page from the Login.aspx. This problem occurs ONLY with IE. After passing some validations and creating ticket the Login page is reloaded again, and NO redirect to Default page exists. Address bar consists always this string:      http://localhost:3706/Login.aspx?ReturnUrl=%2fdefault.aspx  In Global.asax - HttpContext.Current.User is ALWAYS NULL under IE.Here is my code implementation:Web.config:<authentication mode="Forms">   <forms defaultUrl="Default.aspx" loginUrl="Login.aspx" protection="All" timeout="30"> </forms> </authentication>  <authorization>    <deny users="?"/> </authorization><!-- Allow anonymous access (non-Forms login) to the Images folder --> <location path="Images">   <system.web>      <authorization>          <allow users="*"/>      </authorization>   </system.web> </location>Global.asax:protected void Application_AuthenticateRequest(object sender, EventArgs e) {    // look if any security information exists for this request    if (H

Problem in setting up Windows Authentication in Windows 2008 RC2

Hi,We have a working version of application (Intranet) with uses Windows Authentication deployed in Windows 2003. The application uses HttpContext.Current.User.Identity.Name to get the logged-in user. Here impersonate is turned off.Right now, we are move to Windows 2008 RC2 where this Windows Authentication problem arised. I have Digest Authentication and Windows Authentication enabled. And also I have enabled Anonymous Authentication enabled to avoid the Login dialog of IIS in the end-user IE. Now I am getting HttpContext.Current.User.Identity.Name as Empty. When I impersonate using username and password, I am used to login using that user but all the users uses the same user to login.Does any has solution for this?Deployment Server - Windows 2008 RC2 (IIS 7.5)Development - Windows 7 (IIS 7.5)I am new to IIS 7.5. Please give me a solution

Need to solve Form Authentication Problem

Hi all, I have a web site with login page and other pages. For login page currently i put authentication mode = Form. Problem is, when login 2 diffenent user in same pc and 1 browser with 2 tab, first tab is 1 user and 2nd tab is another user. I used Form Authentication ticket ,so for each users has different tickets. After login the 1st user and create a entry , then 2nd user login and trying to create entry that time 2nd user ticket is reset to 1st user ticket. is it any way to avoid this issue? if anyone knows about this please give me your suggestion and example. Thanks S.Shangar  

Form based Authentication - OpenLdap problem

Hi everyone,   I try to set up FBA with LdapMembership provider.   I have configured web app + STS like this : <add name="LDAPMember" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" server="server" port="389" useSSL="false" connectionUsername="uid=portal_sharepoint,ou=people,dc=corp,dc=contoso,dc=com" connectionPassward="somthing" userDNAttribute="distinguishedName" userNameAttribute="cn" userContainer="ou=people,dc=corp,dc=carrefour,dc=com" userObjectClass="person" userFilter="((eduPersonOrgUnitDN=cn=portal_sharepoint,ou=applications,ou=organizations,dc=corp,dc=contoso,dc=com))" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" />   I can without problem use the people picker and get user information from it. But when i try to authenticate user i have an error that say : An exception occurred when trying to issue security token: The security token username and password could not be validated.   If i look my log on the ldap i see that all the time it's the portal dn that is used to authenticate user.   I

Forms Based Authentication - problem with custom master page and login page



I have successfully enabled and set up FBA (Forms Based Authentication) on my SharePoint 2010 Foundation server. The thing is that I need to customize the look and feel of the login page. I have successfully customized the page (and master page) to look the way I want, however, when I try to log in, I get the following error/message on the page:
"Forms Based Authentication on classic Web applications has been deprecated".

What I've done:
Made copies of /_layouts/simple.master and /_layouts/login.aspx and renamed the copies. The markup in the master page is MUCH simpler than the original, but I've kept all the ContentPlaceholders that I don't use (most of them) in a hidden <asp:Panel at the bottom of the page.

I've changed the web.config file:
<authentication mode="Forms">
      <forms loginUrl="/_layouts/loginCustom.aspx" />

So, I'm not getting any errors on the page until I try to log in. When I use the default settings (login.aspx and simple.master) it works just fine (but damn that page looks ugly!).

Does anyone know what I might be missing?

Update: I believe the reason it doesn't work is because my custom login aspx is not part of the Claims Based Web Application (because it's sitting

SMTP authentication problem


Hi all,

I have built a windows service that sends mail from a database table using smtp. This worked fine until we moved to a new ISP. This ISP requires simple smtp authentication. I built this into my service. But still I get problems. I discussed with the ISP what could be the problem, eventually I got it to work using telnet. On my own program though, it still doesn't work. I get the following error:

Error: Mailbox unavailable. The server response was: 5.7.1 <mark@silverstar-it.nl>... Relaying denied. Proper authentication required.

The code I use to send mail:
Dim MailMsg As New MailMessage(New MailAddress("address@domain.nl"), New MailAddress("mark@anotherdomain.nl"))
MailMsg.BodyEncoding = Encoding.Default
MailMsg.Subject = "Onderwerp"
MailMsg.Body = "Mailbody"
MailMsg.Priority = MailPriority.Normal
MailMsg.IsBodyHtml = True

'Smtpclient to send the mail message
Dim SmtpMail As New SmtpClient
SmtpMail.Host = My.Settings.SMTPServer
If My.Settings.SMTPUser.Length > 0 Then
Dim basicAuthenticationInfo As New System.Net.NetworkCredential(My.Settings.SMTPUser, My.Settings.SMTPPass)
SmtpMail.UseDefaultCredentials = False
SmtpMail.Credentials = basicAuthenticationInfo
End If

Setting up a Digest Authentication WCF service and consuming it


I have a WCF service that had been using NTLM authentication, but needed to recently switch it to digest authentication. The service is running on both an XP Professional machine, as well as a 2003 Server machine, both experiencing the same issues.


To set-up the digest authentication, I created the following in my web.config servicemodel section:



		<binding name="NtlmConnect" maxBufferSize="147483647" maxBufferPoolSize="147483647" 

problem with connecting to local SQL Server 2008 default instance using windows authentication




I have a user getting some problem with connecting to local SQL Server 2008 default instance using windows authentication with a user which has sysadmin role and is owner of each existing database:

2010-09-28 15:40:35.04 Logon       Error: 18456, Severity: 14, State: 11.


2010-09-28 15:40:35.04 Logon       Login failed for user 'IIS APPPOOL\RoomViewSEWebClient'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT:]



This us

forms authentication problem



I am working with forms authentication, in web.config my code is

<authentication mode="Forms"  >
      <forms loginUrl="default.aspx" name=".ASPXFORMSAUTH" >

now, in my application If I hit any page directly without login, it redirects me to login page.

On successful login, I add a cookie to the response object.

But this is happening to overall application, what basically my requirement is to a web application, where anonymous users can visit also if user get sign in he can view some extra pages(secure pages)

Problem with SSRS Forms Authentication


Hi All,

I tried SSRS with Forms based authentication. I followed the below link


I am getting null value at the below code line ...[This entire code has been downloaded from the link http://www.codeplex.com/SqlServerSamples/Release/ProjectReleases.aspx?ReleaseId=4000 ]

 string cookieName = response.Headers["RSAuthenticationHeader"];

In "Headers" there is no key as RSAuthenticationHeader and returning null.

Before debugging all this code, done like this....
As per "Readme_FormsAuthenication.htm " file,

1)changed all the config keys of "Report Server and Report Manager" of installed paths.

2)Pasted the .aspx pages in the corresponding "Report Server and Report

problem in form authentication with asp.net 4.0


Hi All,

we are upgrading the asp.net 2.0 web application to asp.net 4.0. we are using form authentication.

<authentication mode="Forms">
	<forms name=".ASPXAUTH" protection="All" timeout="30"  loginUrl="user/login.aspx"></forms>

	<deny users="?"/>

<location path="default.aspx">
			<allow users="?"/>


the site default page is default.aspx

in version 2.0, working fine with form authentication.

after the upgradion

whenever call website .com/" mce_href="http://www..com/">http://www.<domainname>.com, it is redirected to login page

.com/user/login.aspx?ReturnUrl=%2f" mce_href="http://www..com/user/login.aspx?ReturnUrl=%2f">http://www.<domainname>.com/user/login.aspx?ReturnUrl=%2f 

if we call .com/default.aspx" mce_href="http://www..com/default.aspx">http://www.<domainname>.com/default.aspx, it is working fine

How can i fix

Authentication/Firewall problem and Visual studio 2010


i have windows server 2008 running on my pc. i have been able to setup client/server network with a domain. i login on th e client pc and tried to create a website project with VS2010. but each time i choose iis7 of the server i get the following error : the web server does not appear to have any authentication methods enabled. It asked for user authentication, but did not send a WWW-Authenticate header. although i have enable form authentication on the web server and i can access from the client pc the default page of IIS7.Does anyone have any explanation on that? thanks

Sudden authentication problem with IIS7.5 and MVC 2.0


At first I got an error that the user did not have permission to read the config file (web.config).
So I gave NETWORK SERVICE and IIS_IUSRS read on the website folders.

But now vistors can not access images and other static content from the Content folder without logging in. Aspx and .ashx content works however static content is redirected to the login page.


Web.Config has the following settings:

<location path="Content">
			<allow users="*" />


	<validation validateIntegratedModeConfiguration="false" />
	<modules runAllManagedModulesForAllRequests="true">

I was told that the above segment enables .NET to handle static content..  but no luck


<authentication mode="Forms">
<forms name="CTWebCookie" loginUrl="~/Account/Login" defaultUrl="~/Home/Index" slidingExpiration="true" protection="All" timeout="20" />



Login problem with MySQL forms authentication


I can login in locally using the development server, but after uploading the files- including MySql.Data.dll and MySql.Web.dll - to my hosting server I can't. There is no errors, it just won't login. I can get records from my database, so I know it's not the connection.

Here is my Web.config

<?xml version="1.0"?>

    <clear />
    <add name="LocalMySqlServer" connectionString="server=db_server_name;database=tempdb;user id=user_name; password=my_password" providerName="MySql.Data.MySqlClient" />

    <customErrors mode="Off"/>

    <membership defaultProvider="MySQLMembershipProvider">
        <clear />
        <add connectionStringName="LocalMySqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwo

Authentication Problem


I was having trouble with my computer system --viral--and took it to a local shop to have it looked at.  When it was returned I was getting a popup that my Windows was not authenticated, which I ignored and chose to put off another day.  Well last week my system decided to stop working because Windows wasn't authenticated and asked that I insert my Windows disks to continue...completely my fault.  I don't have the disks because Windows was installed on my system when I purchased it.  Can someone help?  Thanks.

Using Login Form with Windows Authentication Problem


Hi all,

I have developed an Interanet web application using the windows Active directory authentication  if user find then it automaticaly authenticated working correctly now  my user wants the capability of being able to login to the intranet site as another user by providing the username and Password .  For example, Team lead needs to login  on other team memeber System to pefrom some task on his behalf  if he or she is not aviable in office .

I have created a standard MS Login Page.  However when I try to login on the page only by providing the Username system authenitcate the user ( not validating the password of that user)

My Web.config is shown below

            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        <authentication mode="Windows"></authentication>
        <identity impersonate="true"/>
            <allow users="*"/>
            <deny users="?"/>


Thanks for your help!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend