Solved

Error connecting to a localhost database

Posted on 2011-03-24
2
266 Views
Last Modified: 2012-06-21
Hi, I'm using asp.net 3.5, C#, sql express with Adv feature on Windows 7 home premium PC
Here is my con string and the run time error:
Login failed for user 'Admin'. The user is not associated with a trusted SQL Server connection.
    <add name="ConString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Survey;User Id=Admin;Password=XXXXXXX"/>

I'm connecting using the SQL login and not Windows's login.  Why am I getting this error?  In the SSE 2005 I created this UserId, select sql login, permissions is also granted for this database so I don't know why am I getting this error.
Ok I tried logging into my sal server using this user id and I got the same error msg"
TITLE: Connect to Server
------------------------------

Cannot connect to NEO\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

Login failed for user 'Admin'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 35212209
It is likely that your security mode is set to windows authentication.
In SQL Server Management Studio right cclick the server name and select properties.
Click the security tab
Click Server and Windows.
Click Ok
You will then be prompted to rstart the SQL Service, click Yes

http://msdn.microsoft.com/en-us/library/ms188670(v=SQL.90).aspx
0
 

Author Closing Comment

by:lapucca
ID: 35212268
That's it.  I set the database to all both type of log in but forgot to do that for the server.  Thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question