473,396 Members | 2,087 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,396 software developers and data experts.

Database Access and trusted connections

I have a strange problem here. I have my development computer with IIS
installed, and we have a SQL server as well on a windows 2000 server. both
are members of a domain. I have restricted access to my web app using NTFS
ACL's and have disabled anonymous logon and enabled windows authentication.
So when a user logons on to a computer and they use there web browser, they
are not prompted to logon to the intranet web app I am building. All seems
to work except for Database Access. When any user logs onto my development
computer, they have no trouble getting database access (which is located on
another computer), but when they log into any other computer, they do not
have database access. in my code, I specify the connection string to use
trusted connections so it uses there current credentials. When a user is
logged into another computer and views a page that access's the database I
get the error, "NT AUTHORITY\ANONYMOUS LOGON DENIED" however, the user is
logged on, and if I display there logon with this command :
User.Identity.Name

it definitly shows the user is logged on the web site with there curent
credintials. Am I missing something here in the code? here is my code by the
way( not that the code is the problem because I am not really doing
anything, just trying to connect)

SqlConnection conPubs = new
SqlConnection("Trusted_connection=yes;Server=mysql server;Database=mydatabase");

SqlCommand cmdSql;

SqlDataReader dtrUsers;

cmdSql = new SqlCommand("SELECT * FROM Users, conPubs);

conPubs.Open();

dtrUsers = cmdSql.ExecuteReader();
Nov 19 '05 #1
4 1945
WJ
Make sure that the domain users are also defined in the MS/SQL 2000 User
object and that your users are truly authenticated by your domain (where the
SQL box is a member of).

John
Nov 19 '05 #2
Try what John adviced !
If problem persist post it.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #3
Yes all perms are set correctly on both the web server and sql server. one
thing I am not to (but pretty sure) is that the user is being authenticated.
I have a label and on the page_load event I set the text of the label to
User.Identity.Name and it shows the name of the user logged on. So I am
pretty sure that the user is using his credentials and is not being logged
on anonymously (and I have disabled that anywayz. Thanks for your help
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
Try what John adviced !
If problem persist post it.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #4
WJ

"Shawn H. Mesiatowsky" <smesiatowsky@_no_spam_perfectfit-ind.com> wrote in
message news:eF*************@TK2MSFTNGP10.phx.gbl...
Yes all perms are set correctly on both the web server and sql server. one
...
I specify the connection string to use trusted connections so it uses
there current credentials. When a user is logged into another computer and
views a page that access's the database I get the error, "NT
AUTHORITY\ANONYMOUS LOGON DENIED"


Sounds like your user is not authenticated to your Domain because SQL server
was sent "ANONYMOUS LOGON", not your user logon (per your 1st post).

John
Nov 19 '05 #5

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

Similar topics

3
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50...
3
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
6
by: Ober | last post by:
I'm having trouble with my security model, Application_Start, and accessing my database. My ASP.NET app is only going to be running in an intranet environment (not on the public Internet). ...
5
by: Mythran | last post by:
I have a test server and a development machine. I have SQL Server installed on both, the installations are pretty much identical. Both servers are in the same domain. When I run my application...
0
by: Jonathan Wood | last post by:
I seem to be having errors creating and accessing an SQL database. Unfortunatley, I am brand new to SQL setup and administration issues so this really is not my area of expertise. I know I had...
0
by: gpl666666 | last post by:
I use Microsoft Access to create a webpage I publish this webpage to our company server, it gives two messages when I open the webpage, one is: "This website uses a data provider that may be...
5
by: John | last post by:
I have an ASP.NET 2.0 application developed in VB.net, that accesses an Microsoft Access database. When the database is on the same IIS server all works just fine. BUT when it tried to access the...
2
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've created a ASP.NET application on my pc using visual studio and it works fine. when i moved it to my web server (another pc with IIS) and surf to my website, the website comes up but...
9
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who...
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
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
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...
0
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 project—planning, coding, testing,...

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.