Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

404 Error on New Added FrontEnd - CRM Dynamics On Premise

Posted on by 65

Hi,

I added a new Front End Server to my Staging Environment and after the setup and restart i tried to access the default website binding localhost:5555  but I'm getting a 404 error, so I enabled tracing and the log shows the below error:

[2022-11-14 09:03:43.419] Process: w3wp |Organization:0cc02ea6-5191-eb11-b819-00155df68c56 |Thread:    6 |Category: Platform.Authentication |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 12dcb563-00f5-4348-a2db-948cf9101a86 |ActivityId: 12dcb563-00f5-4348-a2db-948cf9101a86 | AuthenticationStep.Authenticate  ilOffset = 0x4B
>HostName: localhost:5555, UserId: {D7B435B1-5191-EB11-B819-00155DF68C56}, AppId: {00000000-0000-0000-0000-000000000000}, Context: AuthenticationStep.Authenticate(), Exception details: System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
   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.Open()
   at Microsoft.Crm.CrmDbConnection.InternalOpenWithRetry(IDbConnection connection, String descriptionText)
   at Microsoft.Crm.CrmDbConnection.GetCreateAndOpenConnection()
   at Microsoft.Crm.CrmDbConnection.Open()
   at Microsoft.Crm.SqlExecutionContext.InitConnectionAndTransaction()
   at Microsoft.Crm.SqlExecutionContext.EnsureBeginRequest()
   at Microsoft.Crm.SqlExecutionContext.OnBeginRequest(Boolean startTransaction, IsolationLevel isoLevel, SolutionOperationContext operationContext, Guid solutionId, String workloadGroup)
   at Microsoft.Crm.BusinessEntities.ExecutionContext.OnBeginRequest(Guid userId, Boolean startTransaction, IsolationLevel isolationLevel, ExecutionOperationContext operationContext, CallerOriginToken originToken)
   at Microsoft.Crm.BusinessEntities.ExecutionContext.OnBeginRequest(Boolean startTransaction)
   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheDataInternal(TKey key, Object existingDataContainer, IOrganizationContext context)
   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.<>c__DisplayClass19_0.b__2()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.ValidateUserEnabled(Guid userId, Guid organizationId)
   at Microsoft.Crm.Authentication.Claims.AuthenticationProvider.Authenticate(HttpApplication application)
   at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:-1,State:0,Class:20, TicketId: {00000000-0000-0000-0000-000000000000}

the setup went fine with the same port to SQL server, Any Idea what could be the problem?

  • Verified answer
    Anas Suleiman Profile Picture
    Anas Suleiman 65 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hi,

    So, after a lot of frustration and since I couldn't confirm myself if the ports are open, I had a session with network team, we identified the Problem to be that SQL ports weren't open (frown). some restrictions were applied and not confirmed by the network team so it was as simple as opening the ports..

    Really appreciate all the support!

  • Suggested answer
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Not around ADFS itself no if you dont have it.

    But the conversation about any applicationhost.config or web.config would fit on our ask regarding both servers have the same setup.

    If you have manually updated these files due to some reason, that could eventually be the difference around the 2 servers.

    I think you should go deeper on the error by taking CRM verbose platform traces and/or TCP view to see who and what port is that localhost call failling into.

  • Anas Suleiman Profile Picture
    Anas Suleiman 65 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hi petergroft,

    I dont have ADFS Setup yet. I'm not sure this should apply to my scenario?

    Thanks,

  • petergroft Profile Picture
    petergroft 90 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    In order to fix this issue, you must follow the steps below:

    Stop the IIS service on the AD FS server

    Stop the AD FS service on the AD FS server

    Make a copy of the applicationhost.config file and then open the applicationhost.config file located: C:\windows\system32\inetsrv.

    Review this file for any missing file location paths. Update this file to include all file location paths as displayed below.

    Start the IIS service on the AD FS server.

    Start the AD FS service on the AD FS server.

    Regards,
    Peter

  • Anas Suleiman Profile Picture
    Anas Suleiman 65 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hello Pedro,

    the only other server I have is a full server, and for that regarding the points you mentioned:

    - I'm not sure how to validate the TLS, cyphers, but both servers has the same .NET framework version.

    - configurations are the same.

    - Windows build is different.

    - tcn result succeeded.

  • Anas Suleiman Profile Picture
    Anas Suleiman 65 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hello Pedro,

    I will check these options and get back with the results, Thanks!

  • Suggested answer
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hello Anas,

    Could it be TLS related? cyphers? .net framework version on that new server?

    Are you sure you have the exact same configs as the other frontends?

    Are all the servers on the same build?

    can you try instead connectivity using Test-Netconnection command?

    Sample powershell:

    tnc -computername SQLmachine/DNS -Port 1433

  • Anas Suleiman Profile Picture
    Anas Suleiman 65 on at
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hi,

    Thanks for the reply Pedro,

    these points you mentioned are already investigated and here is my reply:

    - yes it is bind to 5555

    - I've actually included the Org Name in the URL

    - I checked the registry and it is linked to the proper SQL server

    also to mention, I can telnet to the SQL server using port 1433. so I'm confused why it says it is an SQL connection error.

  • Suggested answer
    RE: 404 Error on New Added FrontEnd - CRM Dynamics On Premise

    Hello Anas,

    Hope you are well.

    This might not be enough information to work with as this can be caused by many different reasons.

    Some questions here to try to narrow down the issue:

    - Is the binding on IIS properly set to por 5555 ? i believe so since we enter CRM code on the error

    - If you don't put an org name, CRM will try to load the default organization set for that user, which is normally the first org a user ever accessed. Have you tried inserting on the URL the orgname also? An org that you know it works?  localhost:5555/ORGNAME   - could it be a problem with a specific org instead?

    -  Since traces show a stack around SQL getconnection , can you doublecheck your regedit keys are correctly set to a working SQL server? HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

    Such scenarios can be lengthy to resolve or not!

    If you see it could be complex, please open a case to Microsoft Support.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,552 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans