Forms authentication log in failure

I have visual studio 2008 and using 3.5 sp1.

Also, I have windows web server edition 2008 and sql server 2008 web edition.

If I use windows authentication, it works fine:

    <authentication mode="Windows" />
      <identity impersonate="true" />
      <customErrors mode="Off"/>

But once I switch to forms authentication:

      <authentication mode="Forms">
      <forms cookieless="UseCookies" defaultUrl="~/Default.aspx"
            domain="" enableCrossAppRedirects="false"
            loginUrl="~/Default.aspx" name=".ASPXAUTH"
            path="/" protection="All" requireSSL="false"
            slidingExpiration="true" timeout="30" />
      <identity impersonate="false" />

Even if only a simple one:
      <authentication mode="Forms">
            <forms name=".ASPXAUTH" loginUrl="~/Default.aspx" protection="All" timeout="999999"/>
      <identity impersonate="false" />

It errors...
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

What can I do to get forms authentication to work?

Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
Starr DuskkConnect With a Mentor ASP.NET VB.NET DeveloperAuthor Commented:
I needed:
        <identity impersonate="true" />
Gyanendra SinghArchitectCommented:
are you using and database related stuff... if yes please paste your connection string
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.