views:

64

answers:

1

I have been tasked with a project where I am to add a new application and have it within an older application (web applications). This is an internal application and management decided that they want it wrapped in this older app. The older application is a ASP.net web app using the 3.5 framework.

My original plan was to use jQuery and Web Services (using JSON and AJAX). My team-mate on the project really wants to use Entity Framework (4.0). As we may be sharing the same look and feel the data is a different DB altogether.

After several attempts yesterday, we found some issues. We created a project inside the original solution that targets the 4.0 framework. I created a WebService on the project, but when I tried to call the webservice from the 3.5 project I didn't get an error but I didn't get the return string. I was watching on Firebug and did not see the GET call either.

My team-mate did a little more research and found out about the cross-domain issue and jQuery, so it seems that we are limited with the Entity Framework (3.5) and remaining on the .net Framework (3.5). We did try changing the dataType to jsonp but calling the WebService still didn't work.

However, I was wondering... Really management wants the project wrapped inside this other project for consistency sake (navigation, design and so forth). So the question is there a way to have the 3.5 project display our code that is being generated from the 4.0 project (a totally different solution and probably a different server)? I'm thinking the way the iFrame used to work but I don't want to use an iFrame at all.

I'm hoping there is a nice solution to this.

Any help is appreciated!

+1  A: 

One way to solve this problem would be to stand up a WCF webservice to handle the database calls. You could develop your "data layer" with .NET 4 and EF4, then call that layer from your .NET 3.5 ASP.NET application. It's not the absolute cleanest solution, but it would allow you to get the benefits of the newer version of EF.

Dave Swersky
@Dave - I like your idea of keeping the ASP.Net application as .NET 3.5 and creating the object libraries in .NET 4 and EF 4.Can you elaborate on what process these .NET 4 libraries would get setup? On another web application or another web server? This sounds like a great solution. Do you happen to have any good tutorials on WCF WebServices too? :D
Jeff V
@Jeff: Actually I don't have a lot of experience with WCF, but I know you can call a .NET 4 WCF service from a .NET 3.5 application. Here's the MSDN tutorial on WCF: http://msdn.microsoft.com/en-us/library/ms734712.aspx
Dave Swersky