Deploying MVC/Entity Framework application using Oracle - oracle

One of my colleagues needs an application deployed on a web server. However, the application uses MVC and Entity framework (which are both new technologies for me.)
I have done a straight 'bin copy' deployment. Part of the application seems to function properly, but other parts are not. I believe the application is failing when accessing the database.
Here are the application particulars:
- Visual Studio 2010
- MVC 4
- Entity Framework 5
- Database being accessed: Oracle 11gR1
The machine the application is being deployed on:
- Windows Server 2008 with IIS 7
- An existing Oracle 11.2.0 full client (for use with other applications on the server)
My question: Am I doing this right? Is it necessary to do a separate install of ODAC? And if I do, will it mess up my existing Oracle 11 client?

Yes, you have to install ODAC components on the server.
Please check below link for more info.
Cannot Deploy MVC Project with Entity Framework and Oracle ODAC

Related

MVC 5 web application with Oracle 11g and Entity Framework without Oracle.ManagedDataAccess

my company is using the old Oracle.DataAccess and Oracle 11g (release 2) on many servers with many apps, so I can't update the driver.
Now I have to create a web app, and i'd like to use EF's code first.
The problem is that it works only with the newest ManagedDataAccess, and I can't use it.
Is there any way I can map EF with the oldest driver?
ODP.NET Managed Driver is only a single DLL (Oracle.ManagedDataAccess.dll). There is nothing to install, just put a copy of this DLL to your application directory, that's it. Thus you do not affect any other Oracle installation.

ODP .Net 12 using OraClient11

I know that the request may look somehow weird but I am trying to develop a .Net application using EF and Visual Studio 2010 against a ORACLE 10g DB.
Initially I tried with EF4 which is the embedded one in VS2010 and with ODP11 I am able to make it work. But due to some specific bugs in EF4 (StoreGeneratedPattern bug) I want to go to EF5 or EF6.
While "googleing" a bit I was able to Install EF6 using the nugets and adding the context generator for EF using the following explanation:
https://msdn.microsoft.com/en-us/data/jj206878.aspx
The problem here is that the system is not able to find a proper ODP provider for Entity Framework as I only have ODP11 installed.
Again after investigating a bit :) I saw I need ODP12 which will have full support to EF. My problem here is that all servers will be working with OraClient 11g against a Ora10g DB... I know there is no major problem (at least for the use I need) to use Ora11Client with a Ora10Server but what about ODP? I cannot change the Oracle client and I am wondering whether I can face any issue by having my application developed with ODP12 and being executed in a machine with Ora11g Client.
Is anyone having some advice on this?
Thanks a lot in advance!!
It's my understanding that the managed driver for 12 (Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework available on NuGet) will connect to 10.2 and above and does not require ANY client installed on the computer as it contains the client it needs. It just gets installed in the app's bin directory. Be aware though that it doesn't seem to currently work with .NET 4.0 in case you're still targeting that. The 4.0 version of Oracle.ManagedDataAccess.EntityFramework shows up on NuGet as a beta version and is actually compiled against .NET 4.5.
ODP.NET 12.x has a dependency on the Oracle 12 client software so you cannot use it with the 11 client stack. You can use ODP.NET 12 to connect to databases going back to version 10.2.
You can embed the ODP.NET, unmanaged client stack in your app by using the Xcopy download, or you could use the ODP.NET, Managed Driver which is just one DLL and less than 10 MB in size.
Oracle has the concept of an "Oracle Home" (subdirectories) to allow multiple versions of software to run side by side. So that version 11 Client on your servers can exist alongside with the version 12 software you deploy there.

What use as Database for developing asp.net vNext + Entity Framework 7 on OSX

I'm trying to set up my environment for developing asp.net vNext + Entity Framework 7 on my OSX.
Apparently, there is no provider for MySQL neither PostgreSQL yet. Thus, what can be used as database for developing on OSX?
What you folks have been doing for develop asp.net vNext on OSX? Or should I set up a Windows VM?
Any suggestion?
I've got even an open issue on Github on this topic.
Cheers
We will have a PostgreSQL and/or MySQL provider for EF7 (either delivered by our team or we'll work with a provider writer to help them build it). Work hasn't started on them yet though.
We haven't been focusing on EF7 on Mono at this stage, so there are likely some rough edges. We do have some folks who have successfully used it to connect to a remote SQL Server though.
To date, no RDBMS is supported on OSX for EF7.
Since (LocalDB)\v11.0 doesn't allow remote access and run on OSX/LNX, I've setup a SQLServer2012 Express and SQLServer 2012 Standard Edition hosted on a local Windows VM to establish a remote DB connection from my Visual Studio Code project.
From Visual Studio Code running on OSX, EF7 fails to successfully connect and interact with those local SQL Servers. In this instance, I was using the ASP.NET 5 Music Store example project: GitHub Source
Oh, and with all the SSL requirements, AZURE SQL Server is out of the question as an option.
Microsoft is heading in the right direction, we'll get there, but you're dealing with bleeding edge EF7 at the moment which is a complete reengineering from EF6.

requirements to deploy the mvc 3 application to the server

I want to deploy the application in the Windows Server 2008 R2. But I am wondering if I need to install the .Net Framework 4.0 since the version available in the server is 2.0? Do I need also to install the MVC Framework?
you don't need to install MVC, only dlls can do the task
there are different ways to do it, see links
http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/gg286946.aspx
http://weblogs.asp.net/scottgu/archive/2011/01/18/running-an-asp-net-mvc-3-app-on-a-web-server-that-doesn-t-have-asp-net-mvc-3-installed.aspx
You may use the ASP.NET MVC3 installer,
or simply copy the required dlls into bin directory of your web application
such as System.Web.Mvc.dll,
System.Web.Helpers.dll,
System.Web.Razor.dll,
System.Web.WebPages.dll,
System.Web.WebPages.Razor.dll,
System.Web.WebPages.Administration.dll,
System.Web.WebPages.Deployment.dll,
Microsoft.Web.Infrastructure.dll

How to set up Windows Web Server 2008 R2 for MVC Applications

What I am looking for and seem unable to find, it's late and I'm tired, is a step by step guide on how to set up windows 2008 server to run asp.net mvc applications.
I am a web applications developer, amongst other things, and can do that bit fine. Normally I let someone else, like the hosting company, worry about the setup and just publish using 1-Click with web deploy or ftp.
However, for this projects I have a local Windows Web Server 2008 R2 installed but I don't know how to set it up to run the application. the deploy works, all the files arrive in the correct folder on the server, but can I get it to work?
No.
Hence the question.
For your information the app is built using Sharp Architecture, MVC3 and Razor and targeted at .NET 4 which is installed on both my development PC and the server.
Any suggestions?
Thanks.
Best thing would be to download Windows Web Platform installer and select the options you want, for example, .NET 4, MVC3 etc etc ...
Then, remember to enable ASP.NET in your IIS (under Roles or something...).

Resources