3

我尝试发现服务端点.../XRMServices/2011/Organization.svc,但出现此错误:

发生了错误。
再次尝试此操作。如果问题仍然存在,请查看 Microsoft Dynamics CRM 社区以获取解决方案或联系您组织的 Microsoft Dynamics CRM 管理员。最后,您可以联系 Microsoft 支持。

System.NullReferenceException:对象引用未设置为对象的实例。在 Microsoft.Crm.MainApplication.Application_Error(对象发送者,EventArgs eventArguments)

堆栈跟踪:

Error Description:
Generic SQL error.

Error Details:
Generic SQL error.

Full Stack:
[SqlException: Cannot open database "ASPState" requested by the login. The login failed.

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo, TimeSpan retryInterval)

[HttpException: Unable to connect to SQL Server session database.]
   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo, TimeSpan retryInterval)
   at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling)
   at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
   at System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
   at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
   at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
   at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

什么可能导致问题,CRM有什么问题?

4

5 回答 5

2

由于您使用的是 NETWORK SERVICE,因此您需要确保将网络服务器的计算机帐户添加到 Active Directory 中的 SQLAccessGroup。通常这是在 CRM 设置期间为您完成的,但如果您想稍后更改帐户,您必须记住手动将新帐户添加到该组。以下是描述 CRM 使用的不同组的链接:

http://yazahmad.wordpress.com/2007/01/26/active-directory-security-groups-for-mscrm/

于 2011-06-30T21:46:13.833 回答
0

我也在我的 CRM 服务器上看到了这条消息。我所做的只是在 IIS 上启用和禁用匿名身份验证,这对我有用。我也玩过 web.config 和服务设置,但后来我又回到了第一次安装 CRM 时的那个部分。

在我看来,IIS 并没有告诉 WCF 如何进行身份验证,以及几次冷重启,以及启用和禁用匿名身份验证。唤醒 WCF。

于 2012-01-10T22:19:27.223 回答
0

我完全重新安装了开发堆栈,同样的事情又发生了,我重新安装了我的虚拟机并且它工作了,似乎是一些未知的问题。现在我将尝试在虚拟机的新实例上重现相同的错误。

谢谢大家)

于 2011-07-06T06:23:26.127 回答
0

当用户没有分配角色时,我看到了类似的消息,但这发生在测试环境中,仍然值得检查。

于 2011-06-28T17:09:38.537 回答
0

您的 AppPool 需要是有权访问数据库的用户。

关于 WCF 服务,请检查您的 IIS 网站身份验证设置,以获取您需要的 WCF 服务

  • 启用匿名身份验证
  • 启用ASP.NET 模拟
  • 启用Windows 身份验证

用于在 AD 环境中运行的本地安装。我们也遇到了这个问题,重新启动 IIS 后解决了。

于 2016-01-27T07:17:36.930 回答