473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

One Connection String for Multiple Users (C#)

We have one connection string to our SQL Server 2000:

"Data Source=WORKAPP;Initial Catalog=Parts_Data;Integrated
Security=SSPI;User ID=public;Password=public";

Everyone can connect to the database in our plant except for the Restricted
Users.

Why can't the Restricted Users access this? How can we get around it?

I can access the data, but I am set up as an Administrator.

Our managers can access the data, but they are set up as Power Users.

Most machines are Windows XP, but some use Citrix Servers and a few are
running Windows Vista. The OS does not seem to make any difference.

We do not want to grand Power User status to everyone, and we should not
need to with the correct connection string.
Nov 6 '08 #1
7 4726


jp2msft wrote:
We have one connection string to our SQL Server 2000:

"Data Source=WORKAPP;Initial Catalog=Parts_Data;Integrated
Security=SSPI;User ID=public;Password=public";

Everyone can connect to the database in our plant except for the Restricted
Users.

Why can't the Restricted Users access this? How can we get around it?

I can access the data, but I am set up as an Administrator.

Our managers can access the data, but they are set up as Power Users.

Most machines are Windows XP, but some use Citrix Servers and a few are
running Windows Vista. The OS does not seem to make any difference.

We do not want to grand Power User status to everyone, and we should not
need to with the correct connection string.
Just check if other users (which are not member of Administrators or
Power Users group) can access any other resources on the system on which
your SQL server is running.
Nov 6 '08 #2
My guess:

You have integrated security in there AND sql authentication credentials.
Integrated
Security=SSPI;
(and)
User ID=public;Password=public

Pick **one or the other** for clarity.

http://www.connectionstrings.com/?carrier=sqlserver

I think integrated will override sql authentication......<<< but you
shouldn't be testing this theory.
Get a "correct" connection string in there.

http://www.connectionstrings.com/?carrier=sqlserver
"jp2msft" <jp*****@discussions.microsoft.comwrote in message
news:AB**********************************@microsof t.com...
We have one connection string to our SQL Server 2000:

"Data Source=WORKAPP;Initial Catalog=Parts_Data;Integrated
Security=SSPI;User ID=public;Password=public";

Everyone can connect to the database in our plant except for the
Restricted
Users.

Why can't the Restricted Users access this? How can we get around it?

I can access the data, but I am set up as an Administrator.

Our managers can access the data, but they are set up as Power Users.

Most machines are Windows XP, but some use Citrix Servers and a few are
running Windows Vista. The OS does not seem to make any difference.

We do not want to grand Power User status to everyone, and we should not
need to with the correct connection string.

Nov 6 '08 #3
sloan wrote:
You have integrated security in there AND sql authentication credentials.
Integrated
>Security=SSPI;
(and)
User ID=public;Password=public

Pick **one or the other** for clarity.

http://www.connectionstrings.com/?carrier=sqlserver

I think integrated will override sql authentication......<<< but you
shouldn't be testing this theory.
Get a "correct" connection string in there.

http://www.connectionstrings.com/?carrier=sqlserver
It is allowed to be more explicit with:
Trusted_Connection=False
in the connection string.

Arne

Nov 6 '08 #4
Nice extra tidbit of info!
"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:49***********************@news.sunsite.dk...
sloan wrote:
>You have integrated security in there AND sql authentication credentials.
Integrated
>>Security=SSPI;
(and)
User ID=public;Password=public

Pick **one or the other** for clarity.

http://www.connectionstrings.com/?carrier=sqlserver

I think integrated will override sql authentication......<<< but you
shouldn't be testing this theory.
Get a "correct" connection string in there.

http://www.connectionstrings.com/?carrier=sqlserver

It is allowed to be more explicit with:
Trusted_Connection=False
in the connection string.

Arne

Nov 7 '08 #5
We created an account on our SQL Server 2000 (w/SP4 I believe) called
"codeonly" with the password "codeonly" and it is set up in the SQL Server
Group "WORKAPP (Windows NT)" with the Database Roles of public (I think this
is a company account), db_datareader and db_datawriter.

This is the connection string I am now using:

"Data Source=WORKAPP;Initial Catalog=CO_PARTS;Integrated Security=False;User
Name=codeonly;Password=codeonly"

Out on our factory production floor, all of the computers that are logged in
using an account with a Group Membership of "Restricted user (Users Group)"
can access the data; however, anyone logged in with "Standard user (Power
Users Group)" or "Other: Administrator" is refused connection.

The error message is:

"EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner
'dbo'."

The first line of the StackTrace says:

" at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection)"

How do I fix this? Why is a Restricted user allowed access using this string
whereas anything above is not?
Nov 7 '08 #6
Oh - I just found it!

In the project properties, I had enabled SQL Server debugging, but the
global User ID/Password did not have authorization to do this!

Solution: Uncheck "Enable SQL Server debugging" or set Integrated Security
to SSPI (True).

I wanted to post the results. I hope someone that needs help is able to pull
this post one day.

I hope I didn't take up too much of your time.

"jp2msft" wrote:
We created an account on our SQL Server 2000 (w/SP4 I believe) called
"codeonly" with the password "codeonly" and it is set up in the SQL Server
Group "WORKAPP (Windows NT)" with the Database Roles of public (I think this
is a company account), db_datareader and db_datawriter.

This is the connection string I am now using:

"Data Source=WORKAPP;Initial Catalog=CO_PARTS;Integrated Security=False;User
Name=codeonly;Password=codeonly"

Out on our factory production floor, all of the computers that are logged in
using an account with a Group Membership of "Restricted user (Users Group)"
can access the data; however, anyone logged in with "Standard user (Power
Users Group)" or "Other: Administrator" is refused connection.

The error message is:

"EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner
'dbo'."

The first line of the StackTrace says:

" at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection)"

How do I fix this? Why is a Restricted user allowed access using this string
whereas anything above is not?
Nov 7 '08 #7
Thanks for posting the ultimate fix you found.

Nothing drive me nuts worse than an old old thread with the answer (almost)
there, and then the last post says
"I'll give it a try and let you know".

and ...there is no "letting you know" followup.

"jp2msft" <jp*****@discussions.microsoft.comwrote in message
news:33**********************************@microsof t.com...
Oh - I just found it!

In the project properties, I had enabled SQL Server debugging, but the
global User ID/Password did not have authorization to do this!

Solution: Uncheck "Enable SQL Server debugging" or set Integrated Security
to SSPI (True).

I wanted to post the results. I hope someone that needs help is able to
pull
this post one day.

I hope I didn't take up too much of your time.

"jp2msft" wrote:
>We created an account on our SQL Server 2000 (w/SP4 I believe) called
"codeonly" with the password "codeonly" and it is set up in the SQL
Server
Group "WORKAPP (Windows NT)" with the Database Roles of public (I think
this
is a company account), db_datareader and db_datawriter.

This is the connection string I am now using:

"Data Source=WORKAPP;Initial Catalog=CO_PARTS;Integrated
Security=False;User
Name=codeonly;Password=codeonly"

Out on our factory production floor, all of the computers that are logged
in
using an account with a Group Membership of "Restricted user (Users
Group)"
can access the data; however, anyone logged in with "Standard user (Power
Users Group)" or "Other: Administrator" is refused connection.

The error message is:

"EXECUTE permission denied on object 'sp_sdidebug', database 'master',
owner
'dbo'."

The first line of the StackTrace says:

" at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception,
Boolean breakConnection)"

How do I fix this? Why is a Restricted user allowed access using this
string
whereas anything above is not?

Nov 10 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bob | last post by:
I have an ASP.NET web application that has been running without any problems for a while. I recently transferred the site to shared hosting and had multiple users start to use the site. The problem...
4
by: Mark | last post by:
OK. Here we go. I have an ASP.NET application that does many hits to a SQL Server DB on a separate server. When I first created this application (2 years ago) and was very new to ASP/ASP.NET, to...
8
by: Natan | last post by:
Hi, I`m creating a asp.net intranet system, and would like to put all the logic of the system in a single dll. That is, when i need to create an user for example, i would use "User.Check()" and...
15
by: Rob Nicholson | last post by:
I'm starting to worry a bit now. We're getting the above error when two users hit the same database/page on an ASP.NET application using ADO.NET, talking to a SQL 7 server. The error is perfectly...
37
by: sam44 | last post by:
Hi, At startup the user log on and chooses the name of a client from a dropdownlist, which then changes dynamically the connection string (the name of the client indicates which database to use)....
6
by: Mike | last post by:
We are intermitantly receiving this error on our website. ExecuteReader requires an open and available Connection. The connection's current state is connecting. Following is the code from the Load...
3
by: Sankalp | last post by:
Currently I am developing a advanced VB 2005 application which Display's/ Updates / (Creates New ) data in the database. For this purpose I am using databound controls, i.e. all my datagrids,...
2
by: Brad Pears | last post by:
We have several applications that use the ".exe.config" .xml file to get the connection string to our SQL server db. Each user of the application has their own .xml file because we have some user...
1
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
We have one connection string to our SQL Server 2000: "Data Source=WORKAPP;Initial Catalog=Parts_Data;Integrated Security=SSPI;User ID=public;Password=public" Everyone can connect to the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.