Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

System.Data.SqlClient.SqlException: Login failed for user 'INBOUND47\ASPNET'

Posted on 2010-09-23
8
Medium Priority
?
1,487 Views
Last Modified: 2012-06-27
I have installed a copy of SQL Server 2005 on my local machine temporarily so we can re-configure our SQL server machine from acratch.  I am trying to get it to run from other machines, but I am having problems.  if I run my page from Web Developer Express, it works fine, but when I try to access it from the standard web browser using my machine name, it gives me
System.Data.SqlClient.SqlException: Login failed for user 'INBOUND47\ASPNET'

[SqlException (0x80131904): Login failed for user 'INBOUND47\ASPNET'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125

Open in new window


My web.config file looks like this:
<configuration>

	<!-- enable forms authentication -->
	<connectionStrings>
  <add name="AIMIntranetConnectionString" connectionString="Data Source=INBOUND47\AIMCCSWEB;Initial Catalog=AIMIntranet;Integrated Security=True;user ID=aspnet;password=sss"
   providerName="System.Data.SqlClient" />
 </connectionStrings>
 <system.web>
		<authentication mode="Forms">
			<forms name="ASP101SampleAuth" loginUrl="login_db.aspx" />
		</authentication>
	</system.web>

	<!-- set secure page to reject anonymous users -->
	<location path="admin.aspx">
		<system.web>
			<authorization>
				<deny users="?" />
			</authorization>
		</system.web>
	</location>

</configuration>
 

Open in new window


I did do as one user suggested and add aspnet to my users, but that did not work.

Any and all help is appreciated.
0
Comment
Question by:Anthony_B
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 59

Expert Comment

by:HainKurt
ID: 33749987
can you connect to this db with these values from SSMS?
0
 
LVL 59

Expert Comment

by:HainKurt
ID: 33750005
from SSCM, go to SQL Client 10.0 Config -> Client Protocols and enable some protocols and try again...
0
 

Author Comment

by:Anthony_B
ID: 33750080
all 4 protocols are enabled , shared memory, named pipes, tcp/ip and via.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 59

Expert Comment

by:HainKurt
ID: 33750197
go to ssms, login with windows authontication
go to security
do you see aspnet here? what is the default db?
check user mapping here and check the db AIMIntranet
0
 

Author Comment

by:Anthony_B
ID: 33750318
I do see aspnet here under Logins.  Default DB is set to AIMIntranet, under user mapping, checked off everything in there, still the same issue.
0
 
LVL 59

Expert Comment

by:HainKurt
ID: 33750421
can you connect to db from ssms with this user?
0
 

Author Comment

by:Anthony_B
ID: 33750506
at this time, yes.  I had to make the DB owner aspnet, but I can open it now with SSMS
0
 
LVL 14

Accepted Solution

by:
Dustin Hopkins earned 2000 total points
ID: 33750835
Try this,

If you are using a database username and pass you should set integrated security to false. Otherwise it will use the windows account credentials.

Hope this helps,
Dustin
<add name="AIMIntranetConnectionString" connectionString="Data Source=INBOUND47\AIMCCSWEB;Initial Catalog=AIMIntranet;Integrated Security=False;user ID=aspnet;password=sss"
   providerName="System.Data.SqlClient" />

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question