473,721 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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 1523
do not use Basic Authentication.
Use NT Authentication.

George.
"Ray" <Ra*@discussion s.microsoft.com wrote in message
news:FA******** *************** ***********@mic rosoft.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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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*@discussion s.microsoft.com wrote in message
news:FA******** *************** ***********@mic rosoft.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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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=yourser ver;database=yo urdatabase;uid= yourlogin;pwd=y ourpassword;"

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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />
>
Have following added to systemweb element
>
<identity impersonate="tr ue"/>
>
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=yourser ver;database=yo urdatabase;uid= yourlogin;pwd=y ourpassword;"

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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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=yourser ver;database=yo urdatabase;uid= yourlogin;pwd=y ourpassword;"

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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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=yourser ver;database=yo urdatabase;uid= yourlogin;pwd=y ourpassword;"

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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />
>
Have following added to systemweb element
>
<identity impersonate="tr ue"/>
>
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="tr ue" 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=yourser ver;database=yo urdatabase;uid= yourlogin;pwd=y ourpassword;"
>
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_Connect ion=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="Northwind ConnectionStrin g1" connectionStrin g="Data
Source=VHAV16PL AN1;Initial Catalog=Northwi nd;Integrated Security=SSPI"
providerName="S ystem.Data.SqlC lient" />

Have following added to systemweb element

<identity impersonate="tr ue"/>

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
6325
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. I tested the application by populating a Dataset with the images from SQL Server and rendered just one of the images by using a bitmap and inserting the resulting stream into the response stream as a Jpeg format. My next move was to bind this...
3
3086
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 displayed. Can anybody know this issue and help me to resolve this. In past i received the response saying that i should download the image first and then parse the actual response and modify the src attribute of the
2
1648
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 -------------------------------------------------------------------------------- Access is denied. Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the
1
4969
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application. -------------------------------------------------------------------------------- 無值提供給一或多個必要參數。 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
2
1294
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 Notepad. However, they are challenged with Visual InterDev 6.0. Only the administrator's login and password will let them in. I have re-set their permissions several times. Hmmmmm.
4
2804
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 fired. I have checked everything I could think of, but everything looks correct to me. Here is the relevant code from the *.aspx file and the *.aspx.vb files (if I missed something that is relevant, let me know): ASPX File:
4
1114
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 works. For a single value (non-array) the following will work. On the MasterPage: public String CompanyName
6
3616
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
3302
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: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server...
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9131
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9064
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.