Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Entity framework WCF数据服务登录失败_Entity Framework_Sql Server 2005_Wcf Data Services - Fatal编程技术网

Entity framework WCF数据服务登录失败

Entity framework WCF数据服务登录失败,entity-framework,sql-server-2005,wcf-data-services,Entity Framework,Sql Server 2005,Wcf Data Services,我在以下环境中使用WCF数据服务: IIS 7 视窗7 .NET4.0 实体框架5.0 SQL Server 2005 WCF数据服务可在以下位置访问: http://localhost:81/DataService/WcfDataService.svc 但是,当我输入以下内容时,我得到一个错误: http://localhost:81/DataService/WcfDataService.svc/EntityName(1) 为什么数据服务尝试使用计算机名而不是网络用户名进行连接 -<

我在以下环境中使用WCF数据服务:

IIS 7 视窗7 .NET4.0 实体框架5.0 SQL Server 2005

WCF数据服务可在以下位置访问:

http://localhost:81/DataService/WcfDataService.svc
但是,当我输入以下内容时,我得到一个错误:

http://localhost:81/DataService/WcfDataService.svc/EntityName(1)
为什么数据服务尝试使用计算机名而不是网络用户名进行连接

-<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<m:code/>

<m:message xml:lang="de-DE">An error occurred while processing this request.</m:message>


-<m:innererror>

<m:message>The underlying provider failed on Open.</m:message>

<m:type>System.Data.EntityException</m:type>

<m:stacktrace> at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() at System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) at System.Data.Services.QueryResultInfo.MoveNext() at System.Data.Services.Providers.DataServiceExecutionProviderWrapper.GetSingleResultFromRequest(SegmentInfo segmentInfo) at System.Data.Services.DataService`1.CompareETagAndWriteResponse(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage) at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage) at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()</m:stacktrace>


-<m:internalexception>

<m:message>Login failed for user 'DOMAIN\COMPUTERNAME$'.</m:message>

<m:type>System.Data.SqlClient.SqlException</m:type>

<m:stacktrace> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 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.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 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.ProviderBase.DbConnectionClosed.TryOpenConnection(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 System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)</m:stacktrace>

</m:internalexception>

</m:innererror>

</m:error>
-
处理此请求时出错。
-
基础提供程序在打开时失败。
System.Data.EntityException
在System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition、DbConnection StoreConnectionOpen、DbConnection originalConnection、String exceptionCode、String attemptedOperation、Boolean&closeStoreConnectionOnFailure)中,在System.Data.EntityClient.EntityConnection.Open()中位于System.Data.Objects.ObjectContext.EnsureReconnection()处的System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)处的System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()处的System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal()位于System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)处的System.Data.Services.QueryResultInfo.MoveNext()处的System.Data.Services.Providers.DataServiceExecutionProviderWrapper.GetSingleResultFromRequest(SegmentInfo SegmentInfo)处的System.Data.Objects.ObjectQuery.Collections.IEnumerable.GetEnumerator()处在System.Data.Services.DataService`1.CompareeTagAndWriterResponse(RequestDescription,IDataService DataService,IODataResponseMessage responseMessage)在System.Data.Services.DataService`1.SerializeResponseBy(RequestDescription,IDataService DataService,IODataResponseMessage responseMessage)位于System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription描述)处的System.Data.Services.DataService`1.HandlerRequest()
-
用户“域\计算机名$”登录失败。
System.Data.SqlClient.SqlException
System.Data.SqlClient.TdsParser.ThroweException和System.Data.SqlClient.TdsParser.ThroweException的System.Data.SqlClient.SqlInternalConnection.OneError(SqlException异常、布尔断开连接、操作'1 wrapCloseInAction)和System.Data.SqlClient.TdsParser.TryRun的警告(TdsParserStateObject StateObjects、布尔调用连接锁、布尔异步关闭)(运行行为、SqlCommand cmdHandler、SqlDataReader数据流、BulkCopySimpleResultSet bulkCopyHandler、TdsParserStateObject StateObject、Boolean和dataReady)位于System.Data.SqlClient.TdsParser.Run位于System.Data.SqlClient.SqlInternalConnectionDs.CompleteLogin(布尔登记OK)的System.Data.SqlClient.SqlInternalConnectionDs.CompleteLogin(运行行为、SqlCommand cmdHandler、SqlDataReader数据流、BulkCopySimpleResultSet bulkCopyHandler、TdsParserStateObject StateObject)(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean ignoresnopentimeout、TimeoutTimer timeout、Boolean with failover)位于System.Data.SqlClient.sqlinternalconnectionds.LoginNoFailover(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString connectionOptions、SqlCredential凭证、TimeoutTimer timeout)位于System.Data.SqlClient.sqlinternalconnectionds.OpenLoginEnlist(TimeoutTimer timeout、SqlConnectionString connectionOptions、SqlCredential credential、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance)位于System.Data.SqlClient.SqlInternalConnectionDS..ctor(数据库连接池标识、SqlConnectionString连接选项、SqlCredential凭证、对象提供信息、字符串新密码、SecureString newSecurePassword、布尔重定向声明、SqlConnectionString userConnectionOptions、SessionData reconnectSessionData)位于System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项、DbConnectionPoolKey poolKey、Object poolGroupProviderInfo、DbConnectionPool池、DbConnection owningConnection、DbConnectionOptions用户选项)位于System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection位于System.Data.ProviderBase.DbConnectionPool.CreateObject的(DbConnectionPool池、DbConnectionOwningObject、DbConnectionOptions选项、DbConnectionPoolKey、DbConnectionOptions用户选项)中位于System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject、DbConnectionOptions userOptions、DbConnectionInternal oldConnection)的System.Data.ProviderBase.DbConnectionPool.TryGetConnection(位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection的DbConnection owningObject、UInt32 waitForMultipleObjectsTimeout、Boolean allowCreate、Boolean OnlyOnEckConnection、DbConnectionOptions用户选项、DbConnectionInternal和connection)位于System.Data.ProviderBase.DbConnectionFactory.TryGetConnection的(DbConnection owningObject、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)(位于System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal的DbConnection owningConnection、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal oldConnection、DbConnectionInternal&connection)在System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection-outerConnection,DbConnectionFactory-connectionFactory,TaskCompletionSource`1重试,DbConnectionOptions用户选项)处(DbConnection-outerConnection,DbConnectionFactory-connectionFactory,TaskCompletionSource`1重试,DbConnectionOptions用户选项)在System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)在System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)在System.Data.SqlClient.SqlConnection.Open()在System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(布尔openCondition、DbConnection StoreConnectionOpen、DbConnection originalConnection、String exceptionCode、String attemptedO