# ASP.NET Error - System.Data.SqlClient.SqlException: Login failed for user



## marques_uk (Jun 22, 2009)

Hello, I'm having problems displaying my Catalog page for my online shop on my browser using my local server.

Basically the Catalog page uses a database on my Windows Sql server to get data and its the connection strings in the web.config I'm having problems with.

This is what I was told to use in the book.

<connectionStrings>
<addname="OnlineShopConnection"connectionString="Server=(local)\SqlExpress; Database=OnlineShop; User=; Password="providerName="System.Data.SqlClient" />
</connectionStrings>

but I'm getting the following error in my display.

*Login failed for user ''. *

*Description: *An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

*Exception Details: *System.Data.SqlClient.SqlException: Login failed for user ''.

*Source Error:*

Line 38: {Line 39: Utilities.LogError(ex);Line 40: throw;Line 41: }Line 42: finally

I'm using Windows authentication to log on to the server with no username and password and the connection is fine it's just the loging in information. I have searched a number of forums and people are mentioning different security words to include such as Integrated Security=True, but I include it and it doesn't work.

If anyone can help it will be much appreciated, I think I just need to recode the connection string.

Many thanks
Mark


----------

