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

Connection to SQL Server

I want to have an ASP.Net application to connect to a SQL Server database.

I can’t use Active Directories or Windows authentication (network
security!). So I want to use Forms authentication to allow the user to enter
their SQL Server username and password, check their permissions (from a
table), and then add them to a SQL Server Application Role. I want to use
the SQL Server Application role to simplify the management of permissions
with SQL Server.

I can set up the authentication in the dotnet application.
I can access the user passwords.
I can run the sp_addapprole stored procedure to add a user to the
application role.

But I can’t maintain the connection to SQL Server (and application role)
when I change pages within the application.

Any suggestions?
Nov 22 '05 #1
6 2138
I'm just learning this stuff, but I recall reading about "session state" and
"view state" being able to deal with what you want to do. the msdn library
should have samples

"Graeme" wrote:
I want to have an ASP.Net application to connect to a SQL Server database.

I can’t use Active Directories or Windows authentication (network
security!). So I want to use Forms authentication to allow the user to enter
their SQL Server username and password, check their permissions (from a
table), and then add them to a SQL Server Application Role. I want to use
the SQL Server Application role to simplify the management of permissions
with SQL Server.

I can set up the authentication in the dotnet application.
I can access the user passwords.
I can run the sp_addapprole stored procedure to add a user to the
application role.

But I can’t maintain the connection to SQL Server (and application role)
when I change pages within the application.

Any suggestions?

Nov 22 '05 #2
I'm just learning this stuff, but I recall reading about "session state" and
"view state" being able to deal with what you want to do. the msdn library
should have samples

"Graeme" wrote:
I want to have an ASP.Net application to connect to a SQL Server database.

I can’t use Active Directories or Windows authentication (network
security!). So I want to use Forms authentication to allow the user to enter
their SQL Server username and password, check their permissions (from a
table), and then add them to a SQL Server Application Role. I want to use
the SQL Server Application role to simplify the management of permissions
with SQL Server.

I can set up the authentication in the dotnet application.
I can access the user passwords.
I can run the sp_addapprole stored procedure to add a user to the
application role.

But I can’t maintain the connection to SQL Server (and application role)
when I change pages within the application.

Any suggestions?

Nov 22 '05 #3
Well, HTTP is a stateless protocol, meaning that each subsequent page
request does not know anything about any prior requests.

What you need to do is establish a connection to the SQL server on each page
request.

"rodneybauer1" <ro**********@discussions.microsoft.com> wrote in message
news:15**********************************@microsof t.com...
I'm just learning this stuff, but I recall reading about "session state"
and
"view state" being able to deal with what you want to do. the msdn library
should have samples

"Graeme" wrote:
I want to have an ASP.Net application to connect to a SQL Server
database.

I can't use Active Directories or Windows authentication (network
security!). So I want to use Forms authentication to allow the user to
enter
their SQL Server username and password, check their permissions (from a
table), and then add them to a SQL Server Application Role. I want to
use
the SQL Server Application role to simplify the management of permissions
with SQL Server.

I can set up the authentication in the dotnet application.
I can access the user passwords.
I can run the sp_addapprole stored procedure to add a user to the
application role.

But I can't maintain the connection to SQL Server (and application role)
when I change pages within the application.

Any suggestions?

Nov 22 '05 #4
Well, HTTP is a stateless protocol, meaning that each subsequent page
request does not know anything about any prior requests.

What you need to do is establish a connection to the SQL server on each page
request.

"rodneybauer1" <ro**********@discussions.microsoft.com> wrote in message
news:15**********************************@microsof t.com...
I'm just learning this stuff, but I recall reading about "session state"
and
"view state" being able to deal with what you want to do. the msdn library
should have samples

"Graeme" wrote:
I want to have an ASP.Net application to connect to a SQL Server
database.

I can't use Active Directories or Windows authentication (network
security!). So I want to use Forms authentication to allow the user to
enter
their SQL Server username and password, check their permissions (from a
table), and then add them to a SQL Server Application Role. I want to
use
the SQL Server Application role to simplify the management of permissions
with SQL Server.

I can set up the authentication in the dotnet application.
I can access the user passwords.
I can run the sp_addapprole stored procedure to add a user to the
application role.

But I can't maintain the connection to SQL Server (and application role)
when I change pages within the application.

Any suggestions?

Nov 22 '05 #5
Graeme,

Yo can set information between pages and between the sent and get postedback
state in a session.

Session.Item["User"] = theUser;
and than in the otherpage
theUser = Session.Item["User"]

I hope this helps,

Cor
Nov 22 '05 #6
Graeme,

Yo can set information between pages and between the sent and get postedback
state in a session.

Session.Item["User"] = theUser;
and than in the otherpage
theUser = Session.Item["User"]

I hope this helps,

Cor
Nov 22 '05 #7

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

Similar topics

13
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and...
6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
5
by: Fred Zuckerman | last post by:
Hello All, After reading in this group about the preference for connecting to a SQL Server using a connection string instead of a DSN file, I have done just that. BUT, I cannot update my data....
6
by: Sharon | last post by:
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
5
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
2
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
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
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: 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?
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.