[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SQL Server does not exist or access denied.

Posted on 2006-10-24
17
Medium Priority
?
246 Views
Last Modified: 2008-02-01
Hi,
When ever im trying to run my application im getting this error
SQL Server does not exist or access denied.
i use xml configuration file in my web.config file to connect to my DB.Even though the db name is right  and it exists i keep getting this error...can anyone help me on this,
Thanks
0
Comment
Question by:aspnetdev
[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
  • 4
  • 4
  • 3
  • +1
17 Comments
 
LVL 35

Expert Comment

by:mrichmon
ID: 17797184
Are you connecting onthe correct port?
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 17797187
It would help if you showed your connection code (minus password of course)
0
 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 17797580
Are you using sa account in your code? if yes then check the sa account is enable in your SQL manager.

in Some case this "access denied" problem will come for ASPNET account. Check that account as full rights
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Assisted Solution

by:Steve Sirica
Steve Sirica earned 500 total points
ID: 17797766
Yeah, if you're using a trusted connection without an impersonate it's probably trying to connect as aspnet.  Either specify the User ID & Password in your connection string, give the proper rights to aspnet or add an impersonate to your web.config.  Oh I just remembered, there's always UseDefaultCredentials.  

Any combination of those should work.
0
 
LVL 10

Assisted Solution

by:jnhorst
jnhorst earned 500 total points
ID: 17800043
Trying to give ASPNET (for Win2K -- it will be NETWORK SERVICE for Win2003) access to the SQL Server will be a headache because the ASPNET or NETWORK SERVICE accounts are local to the IIS server and the SQL Server (I am assuming they are on different boxes here) will not know anything about these accounts.  The comment above about using SQL Server Auth and specifying the username and password in the connection string is the easiest path to solving this.

Alternately, if you are allowing anonymous requests to the web site, create a domain/AD account strictly for the web site's database access.  Then change IIS to use this account to authenticate anonymous requests.  Then add this account to the SWL Server Logins section (under the Security node).  Then add the account to the database's Users.

John
0
 
LVL 10

Expert Comment

by:jnhorst
ID: 17800049
Typo... I put "SWL Server" above and obviously meant "SQL Server"...

John
0
 
LVL 11

Assisted Solution

by:Vivek Thangaswamy
Vivek Thangaswamy earned 500 total points
ID: 17956905
Hi  aspnetdev

Is my solution solved your problem?
0
 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 18131314
no reply from you aspnetdev

Is my solution solved your problem?
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 18132791
Any reason all solutions that suggested credentials were marked for a split, but mine- which is also a plausible cause of the wrong port being used - was not included in the split?

I think all are equally viable possibilities and all should be included in a split or a delete no refund should be done.
0
 
LVL 4

Expert Comment

by:Steve Sirica
ID: 18132927
If it would make them feel better, go ahead and give my share of the split to the squeeky wheel as charity points.  Afterall, I'm not here for the points...I'm here to help my fellow programmers.

Can anyone else hear the sounds of the waaaaaabulance?  Too bad this wasn't the Lounge.  :)
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 18134237
I am concerned with what is being documented as possible solutions not with points.  Go ahead and assign 0 points, I would have the same point to make - even if there were no points on the site at all.

But others coming later to look should see what are actual possible solutions if this is being marked as solved - or it should be deleted if it is unclear that any were solutions.
0
 
LVL 4

Expert Comment

by:Steve Sirica
ID: 18138086
<applause>
You're a good sport mrichmon.  Happy to see you have a sense of humor.
</applause>
0
 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 18241093
no reply from you aspnetdev

is our solution helped you???
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

650 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