473,385 Members | 1,748 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,385 software developers and data experts.

Getting Challenged when using SQL connection on .aspx page

Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help
Apr 20 '07 #1
9 1514
do not use Basic Authentication.
Use NT Authentication.

George.
"Ray" <Ra*@discussions.microsoft.comwrote in message
news:FA**********************************@microsof t.com...
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and
other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine
on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the
data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able
to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help


Apr 20 '07 #2
That is not an available option.

"George Ter-Saakov" wrote:
do not use Basic Authentication.
Use NT Authentication.

George.
"Ray" <Ra*@discussions.microsoft.comwrote in message
news:FA**********************************@microsof t.com...
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and
other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine
on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the
data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able
to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help


Apr 20 '07 #3
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help

Apr 20 '07 #4
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.

"Peter Bromberg [C# MVP]" wrote:
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help
Apr 21 '07 #5
Ray,
A SQL Server login connection string:

"server=yourserver;database=yourdatabase;uid=yourl ogin;pwd=yourpassword;"

No SSPI, no "trusted connection". Keep it simple.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.

"Peter Bromberg [C# MVP]" wrote:
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file
>
<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />
>
Have following added to systemweb element
>
<identity impersonate="true"/>
>
I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.
>
When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.
>
I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???
>
I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??
>
Basically, I want the webpage to pass the login token to the SQL
automatically.
>
Help
>
>
Apr 21 '07 #6
Wont that allow anyone who hits the webpage to access the data? I only want
people in those groups that are allowed access to the tables to be able to
see the tables. Just want the login token to be passed, without having to
reenter the login required by the webpage after we have already logged into
the network.

"Peter Bromberg [C# MVP]" wrote:
Ray,
A SQL Server login connection string:

"server=yourserver;database=yourdatabase;uid=yourl ogin;pwd=yourpassword;"

No SSPI, no "trusted connection". Keep it simple.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.

"Peter Bromberg [C# MVP]" wrote:
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"Ray" wrote:
>
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help
Apr 21 '07 #7
Think I replied too quickly. Do you think the integrated security = sspi is
causing the issue?

"Peter Bromberg [C# MVP]" wrote:
Ray,
A SQL Server login connection string:

"server=yourserver;database=yourdatabase;uid=yourl ogin;pwd=yourpassword;"

No SSPI, no "trusted connection". Keep it simple.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.

"Peter Bromberg [C# MVP]" wrote:
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"Ray" wrote:
>
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help
Apr 21 '07 #8
Yes it will, and it's more efficient since the connection string is the same
with all users, which means you'll be efficiently using the ADO.NET
connection pool.
If you want to restrict users from "doing certain stuff", consider
controlling that through Forms Authentication on your web app with Membership
and Roles providers.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Wont that allow anyone who hits the webpage to access the data? I only want
people in those groups that are allowed access to the tables to be able to
see the tables. Just want the login token to be passed, without having to
reenter the login required by the webpage after we have already logged into
the network.

"Peter Bromberg [C# MVP]" wrote:
Ray,
A SQL Server login connection string:

"server=yourserver;database=yourdatabase;uid=yourl ogin;pwd=yourpassword;"

No SSPI, no "trusted connection". Keep it simple.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.
>
"Peter Bromberg [C# MVP]" wrote:
>
switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Ray" wrote:

Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file
>
<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />
>
Have following added to systemweb element
>
<identity impersonate="true"/>
>
I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.
>
When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.
>
I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???
>
I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??
>
Basically, I want the webpage to pass the login token to the SQL
automatically.
>
Help
>
>
Apr 21 '07 #9
Sorry to be asking stuff i can test for myself, but i will not have access to
the network until monday and want to be ready.

What would happen if i removed integrated security=sspi from the connection
string and also removed identity impersonate="true" then changed the settings
on the IIS to use integrated security and deselect basic basic authentication?

"Peter Bromberg [C# MVP]" wrote:
Yes it will, and it's more efficient since the connection string is the same
with all users, which means you'll be efficiently using the ADO.NET
connection pool.
If you want to restrict users from "doing certain stuff", consider
controlling that through Forms Authentication on your web app with Membership
and Roles providers.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ray" wrote:
Wont that allow anyone who hits the webpage to access the data? I only want
people in those groups that are allowed access to the tables to be able to
see the tables. Just want the login token to be passed, without having to
reenter the login required by the webpage after we have already logged into
the network.

"Peter Bromberg [C# MVP]" wrote:
Ray,
A SQL Server login connection string:
>
"server=yourserver;database=yourdatabase;uid=yourl ogin;pwd=yourpassword;"
>
No SSPI, no "trusted connection". Keep it simple.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"Ray" wrote:
>
Mixed Mode is enabled. As you can see in the code i posted, i have used
integrated security=sspi. Do i need to add Trusted_Connection=true? What I
have read says that they are the same.

"Peter Bromberg [C# MVP]" wrote:

switch to using a SQL Server login, and ensure that SQL Server MIXED MODE
authentication is enabled.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"Ray" wrote:
>
Have SQL server on one machine. Have IIS on another machine in same large
intranet. Have website in IIS with Basic Authentication turned on and other
options deselected. Have webpage (.aspx) with following connection in the
web.config file

<add name="NorthwindConnectionString1" connectionString="Data
Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI"
providerName="System.Data.SqlClient" />

Have following added to systemweb element

<identity impersonate="true"/>

I have account to the database on the SQL server. Am logged on to machine on
the same intranet using that account login.

When I try to open the webpage in IE7. I am getting a request for me to
enter my user name and password. After entering it, I am able to see the data
from the SQL connection in the datagrid on the webpage.

I would like the webpage to pass my login credentials directly to the SQL
Server without having to enter it manually. How do I accomplish this???

I want others who have the same access permissions to SQL data to be able to
be recognized automatically also??

Basically, I want the webpage to pass the login token to the SQL
automatically.

Help
Apr 21 '07 #10

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

Similar topics

7
by: gemel | last post by:
I am developing an application that uses SQL 2000 as my source of images. I have successfully created the code to load the images onto the SQL Server and also to retrieve the images into a dataset....
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
2
by: JIM.H. | last post by:
Hello, I know the user I give in the connection string is the database admin, why am I getting the following message? Server Error in '/' Application...
1
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application....
2
by: Richard Lawson | last post by:
Every time developers try to connect to a Windows 2003, IIS 6.0 server they are challenged by NT. The directory is shared and they have full rights and can connect using Windows Explorer and...
4
by: Nathan Sokalski | last post by:
I have a DataList that has an Button as one of the controls in it's ItemTemplate. The Button has a CommandName="delete" attribute, but when I click it the DeleteCommand event doesn't even get...
4
by: Jim McGivney | last post by:
I find myself Syntax Challenged. An array resides on a MasterPage. I want to use the values of the array on an aspx page which is a content page of the MasterPage. I can not find the syntax that...
6
by: David Lozzi | last post by:
Hello there, I'm getting the following error System.NullReferenceException: Object reference not set to an instance of an object. at shopping_bag.GetBagTotals()
7
by: Jim in Arizona | last post by:
I'm brand new at ajax. In fact, about 20 minutes ago was the first time I got it to work. The problem I'm having on another page did not work, however. I'm running into the following error: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.