Home » Windows OS

Cannot generate SSPI context

The crm is working fine and now i am getting thie error. Please see below.


Cannot generate SSPI context.

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: Cannot generate SSPI context.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Cannot generate SSPI context.]
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +578
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +84
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +1649271
  System.Data.SqlClient.SqlConnection.Open() +258
  Microsoft.Crm.CrmDbConnection.Open() +482
  Microsoft.Crm.SharedDatabase.DatabaseMetadata.LoadMetadataXmlFromDatabase(CrmDBConnectionType connectionType, String connectionString, Int32& maxBlobSize) +147
  Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.get_Cache() +125
  Microsoft.Crm.SharedDatabase.DatabaseService.Initialize(String tableName) +36
  Microsoft.Crm.SharedDatabase.DatabaseService.Retrieve(String tableName, String[] columns, PropertyBag[] conditions) +90
  Microsoft.Crm.ServerLocatorService.GetSiteSettingIdFromDatabase() +183
  Microsoft.Crm.ServerLocatorService.GetSiteSettingId() +194
  Microsoft.Crm.ServerLocatorService.GetSiteSetting(String settingName) +42
  Microsoft.Crm.CrmTrace.get_RefreshTrace() +496

I have not done anything to the server that the CRM is hosted on. From time to time the CRM will act funny then it will work again.

This error does not seem to go away. Can someone tell me what i need to do to overcome this issue.


thank you very much.



6 Answers Found


Answer 1

Try restarting the async service - check event log for any other errors.


Verify sql services are up and if so, also try to restart them.


Answer 2

The 'Cannot generate  SSPI context' error  indicates that the crm  Server has authentication problems communicating with the SQL Server. You state that the problem is intermittent; that suggests to me that the overall configuration is correct, but you may have Active Directory problems. My best guess would be that you may have a domain controller that is not replicating with the other domain controllers, but it could be a different issue.

I'd start by looking more at the SQL Server than the CRM Server, and checking the overall health of AD and the domain controllers

Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk

Answer 3

I cannot get SQL Server Agent to start.


For some reason it will not start up and it is set to start up automatically.


Will this cause me to to be able to log in the CRM, and produce the error  i posted above?


this is so weird becuase i have not made any changes to the crm  or the sql server 2008.


What can i do ? i need to access the data  with-in the crm ?



Answer 4

I've got the sql server agent to start up, and i am still getting that error.


When i try to start Microsoft CRM Asynchronous Processing Service i get an error  of:


The Microsoft CRM Asynchronous Processing Service service on Local Computer started and then stopped. Some services stop automatically if  they are not in use by other services or programs.


why is it stopping and not starting?





Answer 5

Finally got to Microsoft CRM Asynchronous Processing Service started by removing the network service as the start up user and then put it right back and it started.

Not sure what to think about that, but who cares, it works. ;)


Answer 6


Restart the "async Service" and also SQL services if not started.

But try to do it on Asunch service.

more details  click here.





<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure