deploying asp.net mvc4 app with EF 5.0 - asp.net-mvc-4

I am pretty new to asp.net mvc development. I have developed an asp.net mvc4 app targeting .NET 4.0 and using EF 5.0 for database connection. Now I want to deploy this app in a Windows 2008 server with IIS 7.5. What are the things I need to make sure that are installed in the server for this application to work properly?
Thanks!

Only two: .NET 4.0 and optionally MVC 4. You can avoid installing MVC 4 if you include binaries in your deployment package.
EF5 you standard .NET 4.0 and for sure you have reference to it, so all needed binaries will be in deployment package

Download MS Web Platform Installer 4.6 if you haven't already on the new Windows 2008 server.
http://www.microsoft.com/web/downloads/platform.aspx
Search for 'Recommended' in the top right search box.
Select and install 'Recommended Server Configuration for Hosting Providers'.
This will install all SQL drivers etc (probably too much in fairness, but in fewer steps) that you need to run .net 4.5 apps, and make it possible to deploy using Web Deploy.
The details of the process can be found in this article
http://www.orcsweb.com/blog/gabe/how-to-install-webdeploy-on-windows-server-2012/

Related

Is the .NET Core SDK required for runtime?

I am setting up a Ubuntu machine to deploy a Asp.Net MVC Core app according to the instructions here. In it, it asks for the .NET Core SDK to be installed.
If my server is meant to just run the web application, is it necessary to install the SDK?
Also, if my app is developed in .NET Core 3.0 in Visual Studio, is it ok to have it in a .NET Core 3.1 runtime?
Runtime will be enough to run deployed application https://dotnet.microsoft.com/download/dotnet-core/3.1
In fact you don't even have to do that. Because you can also Publish self-contained package
https://learn.microsoft.com/pl-pl/dotnet/core/deploying/#publish-self-contained
Which will carry all resources needed for runnint your applicaiton on target OS
v3.1 runtime should support your application built in v3.0
From docs;
Install the SDK (which includes the runtime) if you want to develop
.NET Core apps. Or, if you only need to run apps, install the runtime.
If you're installing the runtime, we suggest you install the ASP.NET
Core runtime, as it includes both .NET Core and ASP.NET Core runtimes.
So you do not have to install SDK if you only need to run apps.
You need to install same runtime version as your project (SDK) version

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

I upgraded an existing application from asp.net core web API 2.0 to 3.1. When I run the application locally, application runs fine without any errors, but when I deployed the application to the same server where the 2.0 application was running, I got an error saying "ANCM failed to find Native dependencies".
Below is the screen shot:
From the provided link:
https://dotnet.microsoft.com/download/dotnet-core/3.1
I was able to find out that I need to install .net core 3.1. I am not sure if I need to install on my server:
ASP.NET Core Runtime 3.1.3
OR
SDK 3.1.201
I already have few 2.1 applications running on the server so I don't want the older applications to stop working if I upgrade to 3.1 . I have IIS installed on the server. Its a Microsoft windows NT version 6.2 DataCenter edition terminal server and my application that I am trying to deploy is .net core 3.1
I just wanted to know whether I should install ASP.NET Core Runtime 3.1.3 or SDK 3.1.201
and installing any of these on the server wont affect the applications that are running on 2.0 .net core framwork.
any help will be apprecaited.
Each .NET Core will define which version it uses and will use that SDK or runtime. Installing another SDK or runtime will not impact previously installed versions.
If your just hosting and not doing any development on the server then you only need to install the runtime. If any development will be taking place you will need the SDK.

How can you get a .NET 4.5 website to run on IIS6?

I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. Problem is I can't get it to run on the server...
.NET 4.0 framework is installed. I've run aspnet_regiis and deployed the website. I gave it it's own application pool. But I'm getting the following error:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible.
So any ideas what I need to do in order for this to work?
EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5...
.Net 4.5 cannot be installed on Windows Server 2003.
Instead, you should use MVC 4.0 on .Net 4.0, which will work fine.

Running a .NET 4.5 ASP.NET MVC web app on a .NET 4 server

I've just downloaded and installed Visual Studio 11 Beta. I looks great and I was thinking about upgrading some of my website to ASP.NET MVC 4 and .NET 4.5. The question I have is if I can run such a website on a hosting plan that has only .NET 4 installed? Maybe by marking the necessary dependencies as "copy local"? I've search around, but as this beta is fresh from the oven, I couldn't find any helpful data.
I think you should have problems with your hosting. Anyway as many will say using beta for production is not a good idea (although I had done it several times). My suggestion is to switch to some HyperV hosting and install all necessary frameworks there.
i had similar problem,i have visual studio 2012 and my host running for .net 4.0
but my site was .net 4.5
when uploaded and saw the site i got error.
i backed up program.
then went to
C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework
there were 3 folder v3.5 v4.0 v4.5
then i created 2 back up folder one for 4.0 and other for 4.5
from each v4.0 and v4.5 copy these:
1-System.ComponentModel.DataAnnotations.dll
2-System.ComponentModel.DataAnnotations.xml
3-System.Data.Linq.dll
4-System.Data.Linq.xml
now that i had back ups did these:
1-change target framework to 4.0 from project options
2-copied above assemblies from folder v4.5 to v4.0
then build application
everything went well.
good luck.

dot net 3.5 app to run on IIS7.5

Hi I have an application which has a main project set to ver 3.5 with some utility projects set to ver 2.0. I need to migrate the app to work on IIS7.5. I have tried recompiling the app as is and putting it on the server but to no avail.
What do I need to do to get this app running on 7.5? Will I need to upgrade the projects in the solution to .net 4.0?
any pointers much appreciated.
No you don't necessary need to upgrade to .NET 4.0 even if it could be nice :-) All you need is to make sure the application pool is set to use CLR 2.0 in IIS and it will run just fine (obviously .NET 3.5 needs to be installed on the server).