am new to ASP.NET and IIS web applications, but not to
SQL databases. I can successfully build Windows apps using
Visual Studio that use ADO. However, for Web Forms, I
created data connection and sqladapter to my SQL Server -
Northwind - which I dragged from Server Explorer. I
generate a dataset, and Preview Data in the da, works
fine. I then enter vb code on Page_Load event:
SqlDataAdapter1 .Fill(ds)
DataGrid1.DataS ource = ds.Tables("Empl oyees")
DataGrid1.DataB ind()
When I build and browse (localhost), I get:
Server Error in myapp...SqlExce ption: Login failed for
user (null). Reason: Not associated with a trusted SQL
Server connection. (I have since found error codes
SQLState 42000 and SQL Error 18452, which could be
permissions among other things, haven't found anything
detailed on how to fix this.) The SQL mode is Windows
auth.I've tried various settings in Web.config connection
string, tried configuring IIS Virtual Directory Managment
on SQL Server setting Integrated Security and I
downloaded the .NET framework onto SQL server. I still
get the error.
Perhaps my workstation version of IIS is not configured
properly(?); do I need an IIS-server edition? Would
appreciate any help, reference to articles, etc. 2 16495
Hello,
You may need to configure SQL Server so the ASPNET user account has login
permission. This article describes how to do that: http://msdn.microsoft.com/library/de...us/vbcon/html/
vbtskaccessings qlserveraslocal user.asp. The article "Accessing SQL Server
from a Web application"
( http://msdn.microsoft.com/library/de...-us/vbcon/html
/vbconaccessings qlserverfromweb application.asp ) contains more general
information that may also be useful.
Hope this helps,
Molly
---
Molly Bostic
..NET Developer Platform User Education
This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- From: "DMS" <dy***********@ hqisec.army.mil > Subject: not associated with a trusted SQL Server connection Date: Mon, 29 Sep 2003 12:19:26 -0700 Newsgroups: microsoft.publi c.dotnet.genera l
am new to ASP.NET and IIS web applications, but not to SQL databases. I can successfully build Windows apps using Visual Studio that use ADO. However, for Web Forms, I created data connection and sqladapter to my SQL Server - Northwind - which I dragged from Server Explorer. I generate a dataset, and Preview Data in the da, works fine. I then enter vb code on Page_Load event: SqlDataAdapter 1.Fill(ds) DataGrid1.Data Source = ds.Tables("Empl oyees") DataGrid1.Data Bind() When I build and browse (localhost), I get: Server Error in myapp...SqlExce ption: Login failed for user (null). Reason: Not associated with a trusted SQL Server connection. (I have since found error codes SQLState 42000 and SQL Error 18452, which could be permissions among other things, haven't found anything detailed on how to fix this.) The SQL mode is Windows auth.I've tried various settings in Web.config connection string, tried configuring IIS Virtual Directory Managment on SQL Server setting Integrated Security and I downloaded the .NET framework onto SQL server. I still get the error. Perhaps my workstation version of IIS is not configured properly(?); do I need an IIS-server edition? Would appreciate any help, reference to articles, etc.
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).
Dyanna,
When you create the Connection on the page, it uses your connection information that you supply, probably set to use a Trusted
Connection to connect to SQL. At runtime, it tries to use a trusted connection again, but this time the application is not running
as you, the logged in user, but as ASPNet, the ASP .Net user account. You should set the ConnectionStrin g on your SQLConnection
before doing the DataBind() in the Page_Load(), and instead of using a trusted connection, use a SQL user, or make sure that your
account under which you run the website is allowed to connect to your SQL Server.
Regards
Thys Brits
MCSD/MCSD.Net
"DMS" <dy***********@ hqisec.army.mil > wrote in message news:0b******** *************** *****@phx.gbl.. .
am new to ASP.NET and IIS web applications, but not to
SQL databases. I can successfully build Windows apps using
Visual Studio that use ADO. However, for Web Forms, I
created data connection and sqladapter to my SQL Server -
Northwind - which I dragged from Server Explorer. I
generate a dataset, and Preview Data in the da, works
fine. I then enter vb code on Page_Load event:
SqlDataAdapter1 .Fill(ds)
DataGrid1.DataS ource = ds.Tables("Empl oyees")
DataGrid1.DataB ind()
When I build and browse (localhost), I get:
Server Error in myapp...SqlExce ption: Login failed for
user (null). Reason: Not associated with a trusted SQL
Server connection. (I have since found error codes
SQLState 42000 and SQL Error 18452, which could be
permissions among other things, haven't found anything
detailed on how to fix this.) The SQL mode is Windows
auth.I've tried various settings in Web.config connection
string, tried configuring IIS Virtual Directory Managment
on SQL Server setting Integrated Security and I
downloaded the .NET framework onto SQL server. I still
get the error.
Perhaps my workstation version of IIS is not configured
properly(?); do I need an IIS-server edition? Would
appreciate any help, reference to articles, etc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TBone |
last post by:
Anyone,
I have a user "john" whose machine is part of the "job" domain. He is
trying to establish an odbc connection to an MS SQL 2000 server on the
"school" domain. He uses Windows authentication to establish the odbc
connection however it gives the error "Login failed for user '(null)'.
Reason: Not associated with a trusted SQL Server connection."
I am guessing that the odbc connection is trying to pass the
credentials of job\john...
|
by: Mark |
last post by:
We are using impersonation so that a user on our domain will login into our
SQL Server using their own domain login and/or associated domain groups. To
do this, we've added:
<authentication mode="Windows" />
<identity impersonate="true"/>
to our web.config file. In IIS, annonymous access is unchecked, digest
authentication is unchecked, basic authentication is unchecked, and
Integrated Windows Authentication is checked.
|
by: Brian Henry |
last post by:
I an trying to connect to a sql server in asp.net with the sql connection
object, and every time i try to open the connection i get this
Server Error in '/' Application.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.
why am i getting this? and how do i get around it? I am logged into the
domain on the machine that the asp.net system is on, the sql server is a
|
by: Ray Valenti |
last post by:
I am able to preview this data in the development environment, but when I
run the application the error below shows up.
How do I set up a Trusted Connection?
-Ray
Server Error in '/WebApplication2' Application.
----------------------------------------------------------------------------
----
|
by: rrober07 |
last post by:
Hello,
My Setup is I have a Web Server machine(Devweb01), Database SQL
Machine(Devsql01), a Client Machine(local machine) I have configured the
SQL machine as follows:
1) Added local Aspnet user account (with same password as aspnet user on IIS
(Devweb01))
2) edited local machine.config file <ProcessModel> Password attribute to
same password (both on IIS and SQL Machine)
3) SQL Server security is Sql Server and Windows
| |
by: DMS |
last post by:
am new to ASP.NET and IIS web applications, but not to
SQL databases. I can successfully build Windows apps using
Visual Studio that use ADO. However, for Web Forms, I
created data connection and sqladapter to my SQL Server -
Northwind - which I dragged from Server Explorer. I
generate a dataset, and Preview Data in the da, works
fine. I then enter vb code on Page_Load event:
SqlDataAdapter1.Fill(ds)
DataGrid1.DataSource =...
|
by: jerminator |
last post by:
Ok I need some help. Up until Tuesday my application was working fine.
It is an asp.net application written in VB. It is very data heavy and
makes multiple calls to a database. The application itself sits on an
IIS6.0 server. And the database is on an SQL2000 server with SP 3a.
On Tuesday we started getting an error when we tried to call up the
application. It said: Login failed for user '(null)'. Reason: Not
associated with a trusted...
|
by: Newbie19 |
last post by:
I'm having an issue with viewing my ASP/SQL application in Internet Explorer. I get the error from my Server (located on my PC using IIS 5.0) stating:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am connected to the database because I can view it in VS 05 and run test queries on it in VS.
This is the stack I get:
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException...
|
by: eruth |
last post by:
There are loads of post on this, but nothing that seems to cover my
exact problem ;)
I have an ASP.Net 1.1 web application running on my local machine. I
want to connect to an SQL 2005 server running on Windows 2003.
If I use SQL authentication, all is fine and dandy. If I want to use
windows authentication it gives the above error. My SQL server is set
to allow both methods (first thing I checked) and is part of the
domain (2nd...
|
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,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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...
|
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, and deployment—without 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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |