ASP.NET MVC & Web Services ASP.NET MVC & Web Services asp.net asp.net

ASP.NET MVC & Web Services


It sounds like you should split out your model into its own assembly and reference it from your MVC-application and WCF-application.

  • YourApp.Data -- Shared model and data access maybe
  • YourApp.Web -- If you want to share more across your web-apps
  • YourApp.Web.Mvc
  • YourApp.Web.WebService

If you want to do WebServices MVC-style maybe you should use MVC to build your own REST-application.


Is there a specific reason you need to add web services to your MVC application? Unless there is a specific reason you should use your controllers in a RESTful manner just as you would a RESTful web service.

Check out this post from Rob Connery for more information:ASP.Net MVC: Using RESTful architecture


Separating the Model into it's own project is not breaking the "MVC" pattern. First off, it is just that -- a pattern. The intention of the MVC pattern is to clearly delineate between your data, the data handlers, and the presenters and the way you interface between them. The best way to do it is how Seb suggested:

  • YourApp.Data
  • YourApp.Web.Mvc
  • YourApp.Web.WebService

Something that might help you out is the MVC Storefront that Rob Conery put together. Go watch the video's here:

MVC Storefront Video Series

And if you want to look at the actual code in your browser to quickly see how he did it, go here:MVC Storefront Codeplex Code Browser