Showing posts with label connects. Show all posts
Showing posts with label connects. Show all posts

Saturday, February 25, 2012

Can't connection to SQL 2000 on Windows 2003 from web application running on windows x

I'm developing a web application that is running locally on my Windows XP PC
. It connects to remote database server which sits on a Windows 2003 server.
When i try to open the connection, i recieve an error, "SQL Server does not
exist or access denied". I
know for fact this connection string works, because I can use the same conne
ction string in a console application, and retrieve data. So far I have esta
blished the following:
-- I can connect to the DB via all client applications (query analyzer, .net
console appliation etc.), except from .net web application.
-- Other developers running windows 2003 and II6 can connect to DB using the
same configuration.
-- Developers, like myself, running on XP and IIS 5.1 can NOT connect.
-- from the .net web application I can connect to SQL servers that reside on
Windows 2000 server.
thanksThanks for posting what you've tried:
This helps enormously. <g>
-- I can connect to the DB via all client applications (query analyzer,
.net console appliation etc.), except from .net web application.
-- Other developers running windows 2003 and II6 can connect to DB using
the same configuration.
-- Developers, like myself, running on XP and IIS 5.1 can NOT connect.
-- from the .net web application I can connect to SQL servers that reside
on Windows 2000 serv
So, what's missing here is what security context or that your web
application is using and what security mode
IIS is in.
Are you running the IIS site in Annony, Basic or Windows Auth ?
Are you attempting to connect to SQL from IIS using an account with
username & password or
with a Trusted Connection?
Does the .NET app attempt to Impersonate?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin,
thank you for the reply. The settings on the IIS and the web application are
fairly generic, I believe I'm using all the default values for configuratio
n.

>Are you running the IIS site in Annony, Basic or Windows Auth ?
Annonymous access is enable on the IIS.

>Are you attempting to connect to SQL from IIS using an account with
username & password or with a Trusted Connection?
I'm using an SQL account with username and password to connect to the DB

>Does the .NET app attempt to Impersonate?
there is no impersonation involved.
-- Kevin McDonnell [MSFT] wrote: --
Thanks for posting what you've tried:
This helps enormously. <g>
-- I can connect to the DB via all client applications (query analyzer,
.net console appliation etc.), except from .net web application.
-- Other developers running windows 2003 and II6 can connect to DB using
the same configuration.
-- Developers, like myself, running on XP and IIS 5.1 can NOT connect.
-- from the .net web application I can connect to SQL servers that reside
on Windows 2000 serv
So, what's missing here is what security context or that your web
application is using and what security mode
IIS is in.
Are you running the IIS site in Annony, Basic or Windows Auth ?
Are you attempting to connect to SQL from IIS using an account with
username & password or
with a Trusted Connection?
Does the .NET app attempt to Impersonate?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||it turns out, to resolve the issue, we just needed to install sp3 a couple o
f times on the SQL server.|||Hi,
I'm having the same problem. And these are mine settings:
Q: Are you running the IIS site in Annony, Basic or Windows Auth ?
A: I'm using FORMS-authentification (web.config)
Q: Are you attempting to connect to SQL from IIS using an account with usern
ame & password or with a Trusted Connection?
A: I want to connect throug username and password
Q: Does the .NET app attempt to Impersonate?
A: As far as i know i don't.
I hope u can explain me the problem.
Thanx Bram
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.

Thursday, February 16, 2012

Cant Connect to Sql Server

Warning extreme newbie.

I am trying to follow a .Net Walk Thru that connects to Sql Server. The SqlConnection, SqlDataAdapter, and DataSet all appear to be working properly, but when the web page opens I get a 'Sql Server Does Not Exist or Access Denied.'

Any ideas would be greatly apprieciated.

fryer

Is the connection string correct (i.e. username, password, server address, etc.) and do you have the correct permissions to access the database?

Ryan|||

Connection Strings: I have used the one generated with the SqlConnection Object and I have modified it many different ways. Integrated Security on & off, By Server name/IP Address. Using a port number & using TCIP/IP. I have also tried my connecting to my local computer and the office server.

Database: I definitely have rights to the database.

Could the problem be how it is connecting, some sort of port disconnect? Could something be overriding my connection string?

Thanks.

fryere

Sunday, February 12, 2012

Cant connect to db after web setup

I have an asp 2.0 app that connects to a database in another city.

When I test this app through VS2005 is connects and works great. After I created a web setup project it goes bad.

I ran the setup on 2 different computers, including the dev machine, both start ok and bring up the applications main menu, but when I choose a menu item that is supposed to bring up a datagrid from the sql server I get an error saying it's not a trusted connection.

Any advice on where I should start looking? It's got me beat.

Thanks.

Hi,

How are you connecting to the remote SQL server DB? Can you paste the connection string from the config file (with changes password, IPs ofcourse)?

Vivek

|||

I've tried these 2 strings and get the same results with each:

connectionString="Data Source=xx.xxx.xx.xxx;Initial Catalog=xxxxxx;Integrated Security=True; provider Name=System.Data.SqlClient"

and:

connectionString="Data Source=xx.xxx.xx.xxx;Network Library=DBMSSOCN;Initial Catalog=xxxxxx;Trusted_Connection=yes;"

providerName="System.Data.SqlClient"

|||

It seems you are trying to connect to a remote DB. You need to check what authentication type is applicable: Sql Server or Windows Integrated. Refer this article on details:

http://builder.com.com/5100-6371_14-6084879.html

HTH,

Vivek

|||Thank you, I will read that tonight and see what I can come up with.