Re: SQL.Net connection in VS2005 from local IIS to local SQLExpres



I guess the obvious question would be is there a login defined in SQL Server
for LANDON\ASPNET? Looking at the SQL Server errorlog file might also tell
you more about what's happening.

You may be running into the difference between User Instance connections and
normal database connection. Look at the connection string for the
applications that do work and see if User Instance is specified. If it is,
then this would work unless you are using the 2.0 dotNet Framework.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Landon Kelsey" <landonmkelsey@xxxxxxxxxxx> wrote in message
news:8CCAA7FD-253B-4F3D-BD65-7F7C57BD1042@xxxxxxxxxxxxxxxx
I can connect easily using C# & ADO.NET on standalone programs.

I am trying to connect from a web site program under .NET 1.1 VS 7 and
always get

Login failed for user 'LANDON\ASPNET'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for
user
'LANDON\ASPNET'.

Source Error:


Line 46: private void Page_Load(object sender, System.EventArgs e)
Line 47: {
Line 48: sqlConnection1.Open();
Line 49: ds = new DataSet();
Line 50: daAttendees = new SqlDataAdapter(


Source File: c:\inetpub\wwwroot\pcswebapp2\webform1.aspx.cs Line: 48

having signed in under IE6 using:
http://localhost/PCSWebApp2/WebForm1.aspx
I've tried everything to fix the problem;




"Sue Hoegemeier" wrote:

Make sure the user is not orphaned and has a valid account
in the database you are specifying in the connection string.

-Sue

On Wed, 12 Apr 2006 11:19:35 -0400, "harry"
<mackey@xxxxxxxx> wrote:

Suddenly my trusted connection no longer works in VS. I try to create a
new
one and recieve this:

"Database schema could not be retrieved for this connection. Please make
sure the connection settings are correct and the database is online
Login failed for user ''. The user is not associated with a trusted SQL
server connection."

1. I changed IIS to use a domain\user instead of IUSR_XX and still
recieve
this error.
2. The firewall has been disabled for now.
3. SQL has named pipes and TCP/IP open, SQL is in mixed mode.
4. I can browse the connection if I am in SQL Authentication using 'sa',
but
need to use WinAuth.

I cannot connect using Window Authentication.

Data Source=POLYP\SQLEXPRESS;Initial Catalog=HR15328;Integrated
Security=True
*Win2K3RC2

Suggestions?
Thanks
Harry






.



Relevant Pages

  • RE: Getting Challenged when using SQL connection on .aspx page
    ... What would happen if i removed integrated security=sspi from the connection ... Just want the login token to be passed, ... Have webpage with following connection in the ... I have account to the database on the SQL server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: provider: Named Pipes Provider, error: 40 - Could not open a c
    ... I have tried connecting to Sql Management Studio and it worked pretty much ... An error has occurred while establishing a connection to the server. ... under the default settings SQL Server does not allow remote connections. ... I have a sql server install / database on the web server. ...
    (microsoft.public.sqlserver.connect)
  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)
  • Re: Permission question - another one
    ... If I add an Sql Login it does add the TRAVAC\ in front of the names, ... seems to be users that were setup to use SQL Server Authentication. ... RAPTOR is the Server that has SQL Server running on it. ... > " I could think I am taking permissions away from someone, ...
    (microsoft.public.sqlserver.programming)
  • Re: Renamed Windows login not found in SQL Server 2000
    ... It's almost like SQL tuck some knowledge away in an area ... of memory that only gets released on Windows stop. ... > I am running SQL Server 2000 SP2 with Windows ... > login gets corrupted) I am unable to add the new login to ...
    (microsoft.public.sqlserver.security)