locked
RTM ADO.Net Data Services and IIS 7 RRS feed

  • Question

  • When I create a new ADO.Net data service, it runs just fine using the Development Web Server.  If I publish or run from IIS though I get the first page listing the entities but browsing to any of them returns the error: An error occurred while processing this request.

     

    I've been poking around on the web and forums and not finding anything useful. Has anyone else had a similar problem or know the solution to getting data services working on IIS 7?

    Tuesday, August 12, 2008 8:14 PM

Answers

  •  

    Hi Larry ,

     Does the stack trace contain any frames including the SqlClient ?

     From what I understand the DataProvider is unable to connect to the underlying store ( Sql Server ?) using the currently logged in user's credentials .

     Did I get that right ?

    Tuesday, August 12, 2008 8:58 PM
    Moderator

All replies

  • I found the verbose setting and the issue appears to be authentication.  The error messages is that Login Failed for NT Authority\Network Service.

     

    I've created a pool using a specific Domain ID but get the same even when using anonymous.  I've also specified that the application run under specific credentials and no affect.

     

    I'm on Vista using IIS 7.  Any help is appreciated.

    Tuesday, August 12, 2008 8:32 PM
  •  

    Hi Larry ,

     Does the stack trace contain any frames including the SqlClient ?

     From what I understand the DataProvider is unable to connect to the underlying store ( Sql Server ?) using the currently logged in user's credentials .

     Did I get that right ?

    Tuesday, August 12, 2008 8:58 PM
    Moderator
  • I'm trying to get IIS to use a domain user when connecting to SQL Server.  SQL Server is on the same box as the web server in this case.  Depending on the settings I make in IIS 7 I can get the error for either NT AUTHORITY\NETWORK SERVICE or IUSR.

     

    Here's what's returned

     

    <?xml version="1.0" encoding="utf-8" standalone="yes" ?>

    - <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <code />
      <message xml:lang="en-US">An error occurred while processing this request.</message>
    - <innererror xmlns="xmlns">
      <message>The underlying provider failed on Open.</message>
      <type>System.Data.EntityException</type>
      <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.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()</stacktrace>
    - <internalexception>
      <message>Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.</message>
      <type>System.Data.SqlClient.SqlException</type>
      <stacktrace>at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 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, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, 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.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)</stacktrace>
      </internalexception>
      </innererror>
      </error
    Tuesday, August 12, 2008 9:02 PM
  •  

    It magically started working.  The current configuration I have is:

     

    No physical Path credentials

    The application pool is Integrated using a domain credential

    The authentication is for anonymous using the same specific domain credentials.

     

    Must have been a caching thing or something, I guess I should have been recycling IIS in between each attempt.

     

    Thanks for listening Smile

    Tuesday, August 12, 2008 9:15 PM