473,395 Members | 1,999 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.

C# Access of SQL Developer using ASP.NET

I am running on Windows XP Professional Service Pack 1 with all Hotfixes
installed. I am the only user of the system.

I installed SQL Server Developer (2000) and want to access the SQL data from
IIS.

I am running on a local machine and its name is AXP. I can run happily if I
directly access SQL telling it to use Windows authentication.

I have a C# Web Service created and when I run a test of it under Visual
Studio .NET 2003 it tells me:

--------
System.Data.SqlClient.SqlException: Login failed for user 'AXP\ASPNET'.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at Northwind.Customer.GetCustomers(String Country) in
c:\inetpub\wwwroot\northwind\customer.asmx.cs:line 64
--------

I assume that there is something "very basic" that I need to do to set SQL
to permit access by ASP.NET. I also assume that this is not set in the
"basic install" of SQL Server.

Can someone give me a hint on how to resolve this issue? Is there a better
newsgroup for this question then the C# newsgroup?

Thanks.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

Nov 15 '05 #1
4 1317
If you open enterprise manager for SQL and head for Security you must give
permission to ASPNET to access the database and what tables it can access.

C

"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
I am running on Windows XP Professional Service Pack 1 with all Hotfixes
installed. I am the only user of the system.

I installed SQL Server Developer (2000) and want to access the SQL data from IIS.

I am running on a local machine and its name is AXP. I can run happily if I directly access SQL telling it to use Windows authentication.

I have a C# Web Service created and when I run a test of it under Visual
Studio .NET 2003 it tells me:

--------
System.Data.SqlClient.SqlException: Login failed for user 'AXP\ASPNET'.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at Northwind.Customer.GetCustomers(String Country) in
c:\inetpub\wwwroot\northwind\customer.asmx.cs:line 64
--------

I assume that there is something "very basic" that I need to do to set SQL
to permit access by ASP.NET. I also assume that this is not set in the
"basic install" of SQL Server.

Can someone give me a hint on how to resolve this issue? Is there a better newsgroup for this question then the C# newsgroup?

Thanks.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

Nov 15 '05 #2
You have to specifically add the ASPNET user account to the SQL Server
logins and give the account appropriate access to the SQL Server, i.e.
datawriter, datareader.

Dale
"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
I am running on Windows XP Professional Service Pack 1 with all Hotfixes
installed. I am the only user of the system.

I installed SQL Server Developer (2000) and want to access the SQL data from IIS.

I am running on a local machine and its name is AXP. I can run happily if I directly access SQL telling it to use Windows authentication.

I have a C# Web Service created and when I run a test of it under Visual
Studio .NET 2003 it tells me:

--------
System.Data.SqlClient.SqlException: Login failed for user 'AXP\ASPNET'.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at Northwind.Customer.GetCustomers(String Country) in
c:\inetpub\wwwroot\northwind\customer.asmx.cs:line 64
--------

I assume that there is something "very basic" that I need to do to set SQL
to permit access by ASP.NET. I also assume that this is not set in the
"basic install" of SQL Server.

Can someone give me a hint on how to resolve this issue? Is there a better newsgroup for this question then the C# newsgroup?

Thanks.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

Nov 15 '05 #3
I enabled it for ASPNET and the application is now running.

You both got me back on track and I am now sufficiently knowledgeable to be
REALLY dangerous.

Thanks for the help.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:e8**************@TK2MSFTNGP10.phx.gbl...
You have to specifically add the ASPNET user account to the SQL Server
logins and give the account appropriate access to the SQL Server, i.e.
datawriter, datareader.

Dale
"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
I am running on Windows XP Professional Service Pack 1 with all Hotfixes
installed. I am the only user of the system.

I installed SQL Server Developer (2000) and want to access the SQL data from
IIS.

I am running on a local machine and its name is AXP. I can run happily if I
directly access SQL telling it to use Windows authentication.

I have a C# Web Service created and when I run a test of it under Visual
Studio .NET 2003 it tells me:

--------
System.Data.SqlClient.SqlException: Login failed for user 'AXP\ASPNET'.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable)
at Northwind.Customer.GetCustomers(String Country) in
c:\inetpub\wwwroot\northwind\customer.asmx.cs:line 64
--------

I assume that there is something "very basic" that I need to do to set SQL to permit access by ASP.NET. I also assume that this is not set in the
"basic install" of SQL Server.

Can someone give me a hint on how to resolve this issue? Is there a

better
newsgroup for this question then the C# newsgroup?

Thanks.

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--


Nov 15 '05 #4

Hi Thom,

I am glad you find what you want.
If you have any further concern, please feel free to tell me, I will work
with you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #5

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

Similar topics

38
by: Remco Groot Beumer | last post by:
Hello, I'm trying to decide if the following situation would be workable: Generate an MS Access Front End (which will run localy on client computers), which will link to a DBMS (SQL server or...
10
by: John Phelan | last post by:
I read an article by, by Mike Groh, in Access-VB-SQL Advisor Magazine, Week 37 that concerns me quite a bit on distributing Access Applications commercially. First I need to describe a "commercial...
7
by: Mark Lees | last post by:
How does one increase their Access skills? I'm creating a basic DB for a non-profit organization. I would classify myself as an advanced beginner. I've got some help books but it seems they...
1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
14
by: Luvin lunch | last post by:
Hi All, People keep saying things like "Access is a nightmare" or "Access is hell" but the only people I hear this from are peopel who aren't that experienced in using Access. The most I can...
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
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
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.