0

Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0 for reference. So I currently have a test site that won't allow me to access its database. It kicks out the below error each time you try to log in. From my side I've tried looking into some other suggestions online such as the web.config perhaps being broken which I've checked and no changes reported on prior working versions. Some minor updates that have since been rolled back to no avail on the system. All the IIS services are running and can be confirmed working with another site on the same server.

Some further info the site is currently running an integrated connection, I've tried doing an explicit connection as well with the same results. All the SQL server services are up and running. From the server event viewer the best I get is

Reason: Could not find a login matching the name provided.

I've also checked the firewall rules to ensure they're still allowing the connections, which they are through the needed ports. So I'm frankly at a bit of a loss as to what to try next or if I missed something glaringly obvious

[SqlException (0x80131904): Login failed for user 'WORKGROUP\x'.]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1341
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +159
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +382
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +307
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +198
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +422
   System.Data.SqlClient.SqlConnection.Open() +199
   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +86
   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +333
   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1141
   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +166
   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +178
   x.Models.AccountMembershipService.ValidateUser(String userName, String password) in D:\x Repo\Dev\x\Models\Users\AccountModels.cs:212
   x.Controllers.AccountController.LogOn(LogOnModel model, String returnUrl) in D:\x Repo\Dev\x\Controllers\Users\AccountController.cs:225
   lambda_method(Closure , ControllerBase , Object[] ) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +77
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0() +80
   System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +396
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +50
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +651
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

Attempted to restart services

Attempted to change web.config

Checked Firewall Rules

Rolled back package updates

When reaching site you are required to log in using credentials on the database. This is not being allowed. No major changes were made between builds being published and when running a localhost version of the site through IIS express the site can access the database using the same integrated constring as the one on the test server. Other similar issues I've looked at did not resolve the issue when tested

  • "WORKGROUP"? You don't even configure AD for these machine? – Lex Li Dec 13 '22 at 17:37
  • Is there a Windows Login created in the SQL Server instance for the `WORKGROUP\x` user? Ref: [CREATE LOGIN (Transact-SQL)](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql) – AlwaysLearning Dec 13 '22 at 23:14
  • Same error you can use as reference: [https://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0](https://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0). – samwu Dec 14 '22 at 01:58
  • AD is configured which is part of the weirdness, there is a windows login for it it was setup for sql and windows auth – k0bra 3eak Dec 14 '22 at 05:43
  • So the login weirdness is the hashed out x is the server name and not an actual user login and workgroup shouldn't exist – k0bra 3eak Dec 14 '22 at 06:14

1 Answers1

0

OK a solution was found

The app pool database info was overwriting the web.config connection data, this was something that had not happened before, but to resolve it the app pool info was just brought in line as to not get any weird conflicts where info gets completely screwed with.