How to run a .Net Core webapplication on a Windows 7 machine? - asp.net-core

I want to run a ASP.Net Core webapplication on a Windows 7 machine without having to install Visual Studio.
Can I just install .Net Core on the production environment or are there some preconditions that have to be met prior to installing .Net Core?

I tried out some scenarios and I found out the following:
For running .Net Core you only need the .Net Core runtime (or the SDK) installed on the production environment. You can find the downloads here: https://github.com/dotnet/core/blob/master/release-notes/download-archive.md
For ASP.Net Core, which uses Kestrel for hosting, you only need the runtime (or the SDK) as well. (I tested this on Windows 7 and Linux Debian)
When hosting with IIS, see Andre.Santarosa answer

Prior to run .NET Core on windows 7, your system must have SP1 and Hotfix KB2533623 insalled, install IIS package via Control Panel then DotNetCore WindowsHosting (this allow IIS to handle ASP.NET Core requests) - Link: https://go.microsoft.com/fwlink/?LinkID=827547
When you create your IIS application, it will create an application pool, set .NET CLR in this pool to "No Managed Code".
This should be enough you to run

Related

ASP.NET Core 5.0 Razor page Deployment in Windows server 2012 R2

I have created a razor page in asp.net core web app (.Net 5.0) and all works fine in my development machine. Now I have to deploy it in my test server which is windows server 2012 R2 version.
I Installed the ASP.NET core bundle version 6.0 in the test server and restarted my machine. I have the publish folder from the development machine. All I have is to copy those files to the test server.
Now I go to the IIS server and see the list of application pools and I dont see .Net 5.0 or .Net 6.0.
I have the following list of application pools
.Net 4.5
.net 2.0,
.net 2.0 with classic,
ASP.NET 4.0
ASP.NET 4.0 CLASSIC
but nothing related to .Net core or .Net 5.0
Even if i create a new application pool in IIS server it shows only
.Net CLR 2.0
.Net CLR 4.0
No Managed code
How will I associate my website to .Net core version ? (5.0 or 6.0)
Thanks,
Venkat.
Its figured out. Looks like the ASP.NET core hosting is very simpler than expected.
All I had to was the following.
0.First publish the files to a folder.
1.Copy the published files to the root directory of the website.
2.Install the ASP.Net core bundle version 6.0 and restart the machine.
and thats all... it works. no need to configure application pool or anything in the IIS server. Deploying the website is much easier in asp.net core.

How to start a released Asp.net Core project?

I'm an asp.net developer and recently trying to archive asp.net-core.
Since it's quite new, I would like to ask, how do you launch a asp.net-core project in a Windows machine?
For normal asp.net, my approach is publishing the project using Visual Studio, bring everything to a Windows machine, use IIS to create a website and point the directory to my physical file.
How about a website that created by asp.net-core?
Do I need to install asp.net-core in server machine? (i don't prefer this)
What should I do with the published file? There are two folders generated after publishing the project:
netcoreapp1.0
PublishOutput
Well, you still can use the file system mechanism to publish an ASP.NET Core project from Visual Studio. But VS uses the dotnet CLI under the hood to do the same stuff. Usually you configure your deployment depending upon your hosting environment such as Windows Server and Linux Server.
For Windows Server
You have to install ASP.NET Core Module in order to publish on IIS successfully. This will also install .NET Core SDK. You can than have the advantages of SSL Terminations and others provided by IIS on Windows Server.
For Linux
You have to use the .NET Core SDK here as well for a published app to acquire the .NET Core runtime (This is why you get those 2 folders). You use Nginx or HAProxy to get all SSL Terminations, Port-Forwarding etc.

Do i need to install asp.net mvc4 on iis server

I am going to deploy my application tomorrow ,so i have few questions.I want to deploy asp.net mvc4 application on 2003 server where .net framework 4.0 is installed.My question is do i need to install asp.net mvc4 also there.Or if i copy the dll responsible for mvc in to that system is sufficient?
another question is i am using entityframework and oracle database so using ODP.NET, if this is the case do i need to install ODP.NET over there or just copying DLL system.dataaccess dll is sufficient?
Rest all i follow this two links will it work
The two links are http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx/
How to deploy MVC application in 2003 server IIS
UPDATE
today i tried and unfortunately i came to know that the framework which i was running .net 4.5 will not be supported in 2003.I made my project in to .net 4.0 and everything working fine in local system,but remote system lot of errors are coming.Method not found etc. I came to know that i have to degrade EF 5.0 to 4.4 i did it like replaced dll and changed one line begin with section but no luck as of now.I have to change somewhere else also.Do you know any proper mechanism which i need to carry forward for this?
No need to install anything explicitly except .Net 4.0. All you need is make sure that all dependencies (assemblies) of your application i.e. MVC, ODP.Net etc are present in bin directory of your application. Also make sure that ASP.Net v4.0 Web service extension is enabled in IIS.
Steps to enable web service extension.
Open IIS 6.0 Manager
Click Web Service Extensions
Enable ASP.NET 4.0
Check below screenshot.

Running .NET 2.0 apps with an IIS ASP.NET version of 4.0

We have a bunch of ASP.NET apps written in .NET 2.0 (with IIS6 ASP.NET version set to 2.0), visible via Virtual Directories within one website deployed to Windows Server 2003. Does anyone know whether we can set the ASP.NET version within IIS, of all of these to 4.0 without breaking the (.NET 2.0) applications - i.e. no other changes other than within IIS
Any official Microsoft link(s) stating this can be done, would be brilliant also
You should avoid such "big changes". ASP.NET 1.x, 2.0 and 4.0 applications should be separated and held in standalone application pools.
Besides, there are too many breaking changes in ASP.NET 4 compared to previous versions, you should carefully migrate when the time is right,
http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes

Hosting WCF 3.5 on AppFabric

I am planning to host the WCF services for one of my project on App Fabric. When i installed App Fabric it asked me to install the .Net Framework 4.0. I Can able to configure the WCF services written in 3.5 on App Fabric but i have to select the Asp.Net v4 as an App Pool. I feel the it using CLR 4.0 for the service.
Question is can i host my WCF 3.5 service on App Fabric as we are developing the solution in 3.5 and there is not much scope to migration to 4.0. Will is work?
The first release of Windows Server AppFabric has two parts:
AppFabric Caching Services, which can speed up access to frequently accessed information such as session data used by an ASP.NET application.
AppFabric Hosting Services, making it easier to run and manage services created with Windows Communication Foundation, especially those built using Windows Workflow Foundation.
Looks like you can not use hosting services in 3.5.
http://msdn.microsoft.com/en-us/library/ff637712.aspx
http://social.technet.microsoft.com/wiki/contents/articles/hosting-net-framework-3-x-services-in-appfabric.aspx
As far as caching goes it depends on the version, this article http://msdn.microsoft.com/en-us/library/ff381375.aspx#_Toc247686147 states:
NOTE: Beginning with the Beta2 version, the .NET framework requirements will change as follows. The Cache Service will require .NET 4.0 to be installed and Cache Clients developed using .NET 3.5 SP1 will be supported.
AppFabric only works from .net 4.0, see:
http://developers.de/blogs/damir_dobric/archive/2010/04/29/appfabric-and-net-framework-dependencies.aspx