0

We started out building an application which had a public side to submit forms. It is a code first EF based application, with models that have inheritance(Table per type, table per hierarchy and associations .

A decision was made to separate the concerns, the internal portal part of the application kept on an internal server, and the public form submissions on a separate server. So I was looking for the best way to let the public form submission still use the same EF Code First Models definitions that are on the internal side.

My initial thoughts were to create a WCF Data Service on the internal portal side and expose that to the app on the server that is hosting the public side, thus giving it the models. And then also expose a submission service on the internal portal, so that the public form can just submit straight to that. The public form also needs to get some lookup information from the database, which is behind the internal portal app, I was planning to serve that up by web service.

If anyone has any suggested best ways to accomplish what I'm after, possibly not even WCF Data Service then please help?

But I've started creating a WCF Data Service and tried it against a context which has a basic model, but whenever I try it against a model class which inherits then it just errors with:

Request Error
The server encountered an error processing the request. See server logs for more details.

As this is a local development environment I can not see any logs. I've also tried WCF Data Services Version 5, same result. I have tried the settings here to get more information on the error, but it doesn't show anything more.

So... 1. Is there a better way to do what I'm trying to do with splitting things? 2. Is there an issue with inheritance EF, Code First and WCF Data Services.

4

1 回答 1

0

I was missing the connection string in the Web.Config of the WCF Data Service. It all started singing after that.

于 2012-11-14T12:03:41.427 回答