windows service with SQLServer dependency on same machine still failing on System.Data.EntityClient.EntityConnection.Open() - where can we go from here??? RRS feed

  • Question

  • Hi,

    we have a windows service which used to be on a seperate machine to SQL Server. It uses Entity Framework for most of it's work and when ever the SQL Server machine was rebooted the service would carry on but not allow another successful access to the database - single failure to open entity and then nothing. We moved the service to the same box as the sql server and made it have a dependency on MSSQLSERVER service. We still have a similar problem - entity open fails and then no more database connectivity until service restarted. Exception stack trace below:

    Exception message;

    The underlying provider failed on Open.

     Inner exception;

    A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) Stack trace;

       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.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

       at MyObject.LoadData()

       at MyService.Service.OnStart(String[] args)

     if anyone knows how to make entity framework on windows service work after reboot of SQL Server machine then please tell me

    Thanks in advance

    Friday, January 27, 2012 3:59 PM