Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader




Membership Provider Connections to remote database in IIS7 Windows 2008 Web Server

I recently went through a nightmare with getting the Membership Provider Login and any other Membership Provider methods to work using Windows 2008 Web Server and IIS7 connecting to a remote SQL Server 2008 database.

I was consistently getting this error (using windows authentication):

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

From the web server, my web site could connect to the database, display a grid from the tables, insert and update tables, but could not perform any of the membership provider methods. When running my app locally via Visual Studio 2008, I could use the log in control fine, just not from the actual web application.

Thanks to Rick Anderson for his tenacity in sticking with me to find a solution, I am going to explain it here so you won't have to go through what I went through...

If you have your database connection working, but your Membership Provider log ins, etc. are failing, do this:

In IIS7 on your Windows 2008 Web Server... 

Please go to Application Pools.

Select your web site.

Click "Advanced Settings" in the "Actions" panel.

Under "Process Model" select "Identity."

In the popup, select the "Custom account" radio button.

"Set" the account and password to your dbo account name and password that are used on your SQL Server 2008 database.

Save that.

Under sites, go to your website. In the Features View panel, select "Authentication" under IIS. Under ASP.Net Impersonation, make sure it's Disabled.

Your web.config will be changed to this:
 <identity impersonate="false" />

You may wish to copy your web.config changes made on the server to your local web site in Visual Studo to get the latest copy.

May your dreams be in ASP.net!

Nannette

 

 

Comments

chamnarn said:

Thank you for solve probleam. :)

# December 23, 2008 2:48 AM

broadys said:

Hi Nannette,

I am having the same problem also, however my hsoting is supplied by a hosting company so I do not have access to the Server settings. Any thought?

# April 6, 2009 12:31 AM

Krishen said:

Thanx voor the sollution.. work finnaly!

Webconfig:

<connectionStrings>

<add name="xxxxx" connectionString="Data Source=xxxxx\xxxx;Initial Catalog=xxxxx;Integrated Security=SSPI" providerName="System.Data.SqlClient" />

</connectionStrings>

# July 14, 2009 5:29 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)