We help IT Professionals succeed at work.

Web Service - Error Message CS0534 - 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member....

Medium Priority
127 Views
Last Modified: 2019-07-23
Hello all!  Am having an issue with a web service that I'm trying to debug but it will not "play" within Visual Studio and I can not connect to it on the server with WCF Test client or a test application though adding the service to the test application does work and only breaks when building the application.  The weird thing is that it is currently working in production.  The errors I am getting are a variation of the same...

c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.ConnectionString.get'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.ConnectionString.set'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.Database.get'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.DataSource.get'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.ServerVersion.get'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.State.get'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.BeginDbTransaction(System.Data.IsolationLevel)'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.Close()'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.ChangeDatabase(string)'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.CreateDbCommand()'
c:\Users\main\AppData\Local\Temp\Test Client Projects\16.0\908eb97f-72d0-4b17-882a-baac49b3143c\Client.cs(23168,26) : error CS0534: 'System.Data.EntityClient.EntityConnection' does not implement inherited abstract member 'System.Data.Common.DbConnection.Open()'

Open in new window


It's the 1st time that I've had any issues debugging a web service.  I've tried searching the error code but wasn't able to find anything helpful.  Any help you could provide would be appreciated.

Thanks in advance,
Greg
Screenshot---2019-07-11---4_08_39-PM.png
Screenshot---2019-07-11---4_12_14-PM.png
Comment
Watch Question

CERTIFIED EXPERT

Commented:
From MSDN

https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0534

A class is required to implement all the abstract members in the base class, unless the class is also abstract.

Have you implemented the classes? something like this

//here is ur abstract class, having abstract method
public abstract class _abstractclass
{
    public abstract void DoWork(int i);
}

//implement that abstract method in the inherited class by using override keyword
public class _implementAbstractclass:_abstractclass
{
    public override void DoWork(int i)
    {
        // give your implementation here
    }

}

Open in new window

Author

Commented:
Thanks Camillia... Looks like the issue is within the References.cs file which I don't think I should be editing...?  I've narrowed it down to 3 different service methods that seem to be causing the issues.  The common denominator between them is that one of the parameters is the EntityConnection that is being passed along.  Safe to assume that there is a better way of doing this or maybe its unnecessary altogether?  It is used in some other code further down the line but maybe it would be ok/better to just create a new connection at those points?  I was concerned that there could be some data issues if a different DB connection was used further into the code but could be off base on that logic :)

Thanks,
Greg

[ServiceContract]
public interface IMiscService
{
    [OperationContract]
    string OutsourcedONEV(string Key, Request req, string SubType, EntityConnection con, Requests_VSearch VSearch);

    [OperationContract]
    string OutsourcedONESA(string Key, Request req, string SubType, EntityConnection con, SecurityAgreement sa, int? Ooid);

    [OperationContract]
    string OutsourcedONEDisc(string Key, Request req, string SubType, EntityConnection con, SecurityAgreementDisc sad, int? Ooid);
} 

Open in new window

I ended up just removing the database connections parameters from the different methods and things are working aok :)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.