Quantcast
Channel: Question and Answer » web-services
Viewing all articles
Browse latest Browse all 136

Custom WCF Service in SharePoint That Queries SQL Server

$
0
0

I’m able to create a WCF service and deploy it SharePoint. When I try to add functionality to interact with a SQL Server database, the service stops working.

For testing, I’ve tried creating an ADO.NET entity model, also tried creating a hard coded connection string and query. Both failed.

Error:
*The server encountered an error processing the request. The exception message is ‘The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.’. See server logs for more details. The exception stack trace is:

at newservice.myservice.Test() at SyncInvokeTest(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)*

Does anyone have a working example or can guide me on what needs to happen to achieve this?


Viewing all articles
Browse latest Browse all 136

Trending Articles