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

SQL 2000, ASP.NET 2.0 and two servers between :/

Hello!

I know, that was a lot of threads about it, but nothing helps me...
I get user 'null' when i'm trying to access SQL.

My lab:
1) one client station with IE
2) one w2k3 with Sharepoint Portal Server. It contains webpart displaying my
asp.net page
3) one server with IIS that contains my asp.net page (configured as Windows
Authentication only)
4) one server with SQL 2000 database (configured in mixed mode)

User 'null' is between 3 and 4. In webconfig i have this lines for
authentication:
<authentication mode="Windows"/>
<identity impersonate="true" />

SQL connection string is:
<add name="connStr" connectionString="Data Source=srvSQL;Initial
Catalog=MyTestDB;Integrated Security=true;"
ProviderName="System.Data.SqlClient"/>

I'm using datareader to read data from base. I'm trying to give access to
read to users, who will be in specific domain group. Second new group will
have write permissions. Last will be admins.

How can I pass username from client to SQL by WWW?



Nov 21 '06 #1
1 978
There are a couple of ways of accomplishing the scenario envisioned. None of
the scenarios are particularly "easy", however.

Option 1 (not in isolation, i.e. may be PART of the solution) involves
utilizing a common session server for both SharePoint and your web server.
You have to set the same machine keys on both machines to get this to work.
You also have to have identical session cookie names (default is okay, if
you do not wish to monkey). The machines also have to exist in the same
domain in order to read the session cookie.

From the standpoint of the applications, they share authentication, not
session variables. Do not start shoving lots of information into the Session
object and expect to pass between applications (sharepoint and web).

If you set up in this manner and have SQL Server properly configured for the
user(s), you should be fine.

Option 2 involves domain logins. This is strictly for being able to access
the server and may require common session (above), in addition, if you want
to make the appliation work cohesively without data trips from both
machines.

Regardless of which of the above you use (or both), you still need to set up
groups in SQL Server. If you want to maintain the domain aspect (windows
authentication), you should turn off anonymous access on the site, at least
on any interactive pages.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
"marek zegarek" <ma***@zegarek.plwrote in message
news:ed**************@TK2MSFTNGP02.phx.gbl...
Hello!

I know, that was a lot of threads about it, but nothing helps me...
I get user 'null' when i'm trying to access SQL.

My lab:
1) one client station with IE
2) one w2k3 with Sharepoint Portal Server. It contains webpart displaying
my asp.net page
3) one server with IIS that contains my asp.net page (configured as
Windows Authentication only)
4) one server with SQL 2000 database (configured in mixed mode)

User 'null' is between 3 and 4. In webconfig i have this lines for
authentication:
<authentication mode="Windows"/>
<identity impersonate="true" />

SQL connection string is:
<add name="connStr" connectionString="Data Source=srvSQL;Initial
Catalog=MyTestDB;Integrated Security=true;"
ProviderName="System.Data.SqlClient"/>

I'm using datareader to read data from base. I'm trying to give access to
read to users, who will be in specific domain group. Second new group will
have write permissions. Last will be admins.

How can I pass username from client to SQL by WWW?



Nov 21 '06 #2

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

Similar topics

2
by: LizP | last post by:
Could someone help us with a problem we're having with regard to moving several databases from SQL 7 to SQL 2000 on different servers in different domains. Our current SQL 7 server resides in one...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
5
by: Lorax | last post by:
I'm on the IS team of a medium-sized non-profit with international reach. We're trying to make some decisions regarding our Web server and database server as we expand our web site to have more...
1
by: TBlair | last post by:
I am about to start working on a project where I would be required to dynamically create linked servers during the execution of an application. One of the requirements is for the Link Servers to be...
3
by: Patrick Nolan | last post by:
Hello, When I run my aspx pages with IIS on my own 2000 pro machine the pages display as if the page is a regular asp page. It seems to ignore my CodeBehind code. I can run the same page with...
0
by: eroepe | last post by:
Hi, Does anyone have experience in replicating between two servers running 2000 with a database in 65 compatibility mode? Here's my situation. I'm setting up two servers. Server 1 is the...
3
by: dean4if | last post by:
I have 4 Windows 2000 Servers. I have installed the DotNet Framework 2.0 on all 4 servers. Three of these servers show a tab for ASP.NET in the IIS MMC and are running Visual Studio 2003. ...
0
by: Dale | last post by:
Access 2000 (mdb / mde) Frt End to SQL 2000 Backend I have an Access app that is linked to SQL 2000 using the DSN-Less method. I have 3 sql servers (3 different locations) that contain the exact...
1
by: Alex | last post by:
Hi Everyone, Most of our MS SQL Servers are still running on SQL 2000, but being I will soon be upgrading my workstation to Vista Business I'd like to install MS SQL 2005 Enterprise Manager to...
7
by: TerpZebra | last post by:
I am having difficulty connecting to SQL Server 2000 on one of our servers via a VB6 program on Vista. I can connect fine to a different server, but it gives me the following error with the server...
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:
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...
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
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...

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.