Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Login Failed for "DOMAIN\MACHINENAME$" in production system if user is idle for sometime.

$
0
0

Hi,

            I have an Asp.Net project which uses SQL database using EF. I use Role based authorization while performing few operations like Create, Edit functionalities which requires database access. Application works fine in development machine without any issue. But problem occurs after hosted in IIS of remote production server (Windows 2008 server) in following scenario:

1. From client while accessing the website (internal website) initial page  loads successfully. This doesn't require database call.

2. On clicking a button, data from db will be populated in table format. Each entry has Edit button to edit the data and saves it to db upon clicking Save.

3. If the user is idle for 5 min in this page and then clicking Edit, it display error message indicating Login failed for "Domain\MachineName$". But if user clicks Edit just after the data table is loaded (<5 min), Edit page loads successfully.

I have already used following settings, but have no success:

- Web.Config: Connection Timeout = 0 is set in connectionString. sessionState is defined for duration of 30 min. Authentication is set to "Windows". Integrated Security is set to SSPI

- IIS: Application pool is created with built in NetworkService as Identity and with Idle Timeout set to 30 min. Have provided the directory permission. Windows Authentication is enabled for Authentication with Application Pool Identity checked.

- SQL Server: Have given proper permission to the user and also to "DOMAIN\MACHINENAME$".

The exception for  is:

Error Inner Exception Message = System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMAIN\MACHINENAME$'. at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass4.<<ExecuteAsync>b__3>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<ExecuteAsyncImplementation>d__9`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Data.Entity.Core.EntityClient.EntityConnection.<OpenAsync>d__8.MoveNext() ClientConnectionId:d6b5aa6b-0b90-459d-8355-b3917059cc15 Error Number:18456,State:1,Class:14

Event Viewer data from server:

Login failed for user 'DOMAIN\MACHINENAME$'. Reason: Could not find a login matching the name provided.

Any advice much appreciated. Thanks in advance.


Viewing all articles
Browse latest Browse all 4737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>