c# - Entity framework issue with WCF and IIS -


I have a WCF service in a machine, an MS SQL database and the development environment of Visual Studio 2008 I iis 7 Operating System with Windows Server 2008 is IIS 7 hosts my WCF service and the service is connecting to the database using the Microsoft Entity Framework. Currently, I use the WCF Test client program from Microsoft WCF Received'm testing.

The problem is that when I declare a unit like this in my WCF method:

  newestdbentte db = new newtte dbestentes ();  

If I'm connecting to hosting WCF service on IIS, then WCF service client shows error.

This error message is in the form of a WCF service client:

Failed to apply the service The possible cause: The service is offline or inaccessible; Client-side configuration does not match proxy; The current proxy is invalid View the stack trace for more details. You can try to recover by starting a new proxy, restoring the default configuration, or refreshing the service.

I know that this line throws an error because if I take this line away, then WCF completes the call

I have a debugger (WCF service customer IIS is connected to ASP.NET Development Server, and tried to check the WCF service by running this line of code

.  NewTestDBTTs DB = New NewTestDBTT ();  

Run without error Does anyone know why this happens?

Thank you very much. Your WCF service is hosted in IIS - but have you been using relevant web.config

EF4 the connection string is copied, also ??

If only the object context ( NewTestDBEntities ) stops with the bat, it is usually because the connection information is not available for your host application (here: IIS).


Comments