Last post Jun 29, 2015 06:35 AM by NiteshKumar
Jun 17, 2012 11:30 PM|claudia888|LINK
I'm building a MVC3 web app, using ASP.NET4 and C#; at this point my app needs to interact with an existing app that was developed in 2008, using WinForms, C# and ASP.NET2.
For conveniece I will refer to the existing old app as "A", and my new app as "B".
A - hosted on a server running Windows 2003 and SQL 2005; using ASP.NET2, Windows Forms;
B - hosted on a server running Windows 2008 and SQL 2008; using ASP.NET4 and MVC3.
Now my questions in details:
1) From A (using MVC3) - if I need to access data (read and write) from some tables in app B (using SQL 2005), what is the best way to do that?
Note: Someone suggested to build a "web service", and code project; I read thru this article but am not sure if the info is old, since this articke below was written in 2003;
today how does VS2010 handle web service? Is ".asmx" file or "wsdl.exe" still in use in a MVC app?
2) From A (using MVC3) - if I need to call certain Stored Procedures and Functions that are in the DB of app B, performing actions on the tables in app B, then pass the "result" data to app A - how do I do that?
3) Same needs from B (using Win Forms) to A - I need to access the data stored in the tables of app A, for both read and write; when I figure out how to do the above 1) and 2), will the same method work for the flow of "from B, access A's
I read thru the article from the above link, and other info on "Web Service" - but I really need to see some code working on this subject.
Can someone provide some sample code or point me to a url that has that?
Thank you very much - I'll wait and check any reply often.
Jun 29, 2015 06:35 AM|NiteshKumar|LINK
I will suggest you to go for Web API.
Reason being it is faster and resource oriented , best suited for read write operations.