I am in the middle of developing my first C# ASP.NET (v 4.5.2) Web API, and until now i have been only using Visual Studio 2015 Professional, with IIS Express 10 for debugging.
I have no previous experience with IIS or ASP.NET deployment in general.
So my questions :
When i publish my application and try to deploy it on the production IIS (which will probably be IIS v.8), am i going to need any .Net frameworks or any other packages manually installed on the server? What about any Nuget packages i use? Does the publishing process wrap all the needed files?
Which version of IIS am i going to need in order for my
application to work?
Are there any other considerations to ensure that an ASP.NET app will be
deployed successfully on a production environment? Like if i use MVC
or Entity Framework do i need to install those manually on the
server?
EDIT : Forgot about Crystal Reports! I suppose this has to be manually installed on the server right?
1.
if you take a new version of IIS you should not have to install .net frameworks. If the target framework does not exist on that server, you have to install it and register for iis : https://msdn.microsoft.com/de-de/library/k6h9cz8h(v=vs.100).aspx
The nuget packages won't be a problem because Vs will deploy all dlls too (like on express)
If you are using some special things like Url-Rewrite you have to install these modules manually (e.g. for url-rewrite https://www.iis.net/downloads/microsoft/url-rewrite)
2.
About the version, if you want to do it easy, just use the newest. But it depends on which server-version do you use, even though most applications work on older IIS too. Maybe some changes in the web.config have to be made if you are using some kind of "special" configurations
3.
For deployment you have several options:
Webdeploy (https://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later)
Deployment over FTP/Fileshare - create on IIS an Application - ensure that the right .net framework is selected - create fileshare or ftp - then deploy it into the directory, which is app-directory
Related
I have successfully completed my first project in an ASP.NET Core application using Connector/NET Core to explore the possibility to run this application on any .NET Core
This is the tutorial
This project work correctly on http://localhost:62954/Tablename
Now I need publish the project on the windows server 2008 for sharing on the web this work
On the server I have installed dotnet-sdk-3.1.300-win-x64.exe
I have copied the folder and file from project local to remote server c:\inetpub\wwwroot\aspnetcore\mvccore
but if get on the browser the link http://mywebsite/aspnetcore/mvccore/views/tablename/Index.cshtml
the return is page not found
isn't copying the local file and folders on the server enough for the project to work?
I am server administrator... maybe do I have to configure IIS?
can the new configuration create problems to the existing one on IIS?
how to do resolve this?
can you help me, please?
You need IIS for that. But, since you have a .NET Core App, why wouldn't you use Docker to avoid environment problems? It's very easy to configure with Visual Studio 2019.
Activate MVC Web site on IIS 7 Windows Server 2008 R2 Enterprise SP2
https://forums.asp.net/t/2167474.aspx?First+project+in+an+ASP+NET+Core+3+1+application
I want to publish a sample .net core web application on my pc's IIS manager but I failed. I am using Microsoft guidance but it doesn't work for me, if you have reasonable experience to fix this problem I would be grateful to see your suggestions.
I was missing the AspNetCoreModule from IIS->Modules. After I installed that I no longer had the 500.19 error.
To find out more this blog was great: https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
Here is the page from Microsoft to find the download: https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x
You have to install the "Hosting Bundle Installer". Without this, IIS doesn't understand routing and cannot host your application.
Go to microsoft site "https://www.microsoft.com/net/download/dotnet-core/runtime-2.1.0-rc1" and install "Hosting Bundle Installer":
Before installing this you have to install the right version of runtime:
https://www.microsoft.com/net/download/dotnet-core/runtime-2.1.0-rc1
Than install the right version of "Hosting Bundle Installer".
"Hosting Bundle Installer" is:
.NET Core Windows Server Hosting bundle installs the .NET Core Runtime, .NET Core Library,
and the ASP.NET Core Module. The module creates a reverse proxy between IIS and the Kestrel server on Windows platforms.
The identity under which your web application runs in IIS doesn't have full access to the folder in which the web.config file is found.
Which version of IIS are you using? Assuming 7, you can view/change the identity through the 'Advanced Settings' of the application pool that hosts your application. Folder permissions can be granted via Windows Explorer in the usual way.
Sure, you have to follow this tutorial to deploy to IIS:
https://learn.microsoft.com/en-us/aspnet/core/publishing/iis
I would suggest you to do this:
Publish your web application to desktop.
Copy the folder to the server.
Open cmd and run cd
In cmd run
dotnet webapplication.dll
You should see that application is run and waiting for responses on localhost:port.
Open browser and navigate there. It should work.
Otherwise, you will be able to see all the errors in the cmd window.
OR
Go to microsoft site "https://www.microsoft.com/net/download/dotnet-core/runtime-2.1.0-rc1" and install "Hosting Bundle Installer":
In my case I was getting the same error.
It was nothing to do with the permissions.
I had to install the followings
1- Microsoft .NET Core Runtime
2- Microsoft ASP.NET Core Runtime
3- Microsoft ASP.NET Core Hosting Bundle
from the below location. (Please chose the relevant version)
https://dotnet.microsoft.com/download/archives
Then I had to execute the following commands as well.
net stop was /y
net start w3svc
You can either restart the machine.
That fixed for me.
Try to edit/open any configuration for the site.
If you can't access the configuration options for the site under IIS Manager, check commenting the tag < aspNetCore >, if problem solve, uncomment it and install.
ASP.NET Core Hosting Bundle.
ASP.NET Core 3.1 Runtime (v3.1.3) - Windows Hosting Bundle Installer.
Write dotnet --info in your command prompt to see your SDK versions. (after words .NET SDKs installed:)
Find your equal Hosting Bundle version and install it.
For example : SDK 3.1.408 needs Hosting Bundle 3.1.14.
https://karthiktechblog.com/aspnetcore/how-to-solve-http-error-500-19-internal-server-error-in-windows-server-iis-for-dotnet-core-application
We've observed this problem on our server even though Hosting Bundle was already installed. The problem was, the hosting bundle was installed BEFORE IIS feature was enabled. The fix was to Repair hosting bundle install by running the installer again.
Very good, in my case a module called "urlrewrite" was missing.
You install it with the "Microsoft Web Platform Installer" application.
I also had this problem and the problem was solved by installing the Hosting Bundle Installer.
You can install from url:
https://dotnet.microsoft.com/download/dotnet
We had a slightly different issue at my work. We had a publish profile in Visual Studio set to delete all files upon publishing, and this was a problem for us because we manually gave our IIS service account filesystem permissions to that one, explicit folder beforehand.
So with that publish flag enabled, it zapped the folder and its permissions alongside it and caused a filesystem permissions issue after.
We just disabled this flag in the Visual Studio publish profile and it was fine after that.
I want to install my asp.net 5 website on a windows server 2012 box (IIS). From what I understand, asp.net 5 is self-contained and is deployed via the Publish function of Visual Studio 2015. And, thus doesn't need to be separately installed on the target server..
Is this correct?
IIS configuration is documented. You need to install the IIS Platform Handler, as IIS doesn't understand the new way to start apps without it.
After that publish will do everything you need.
I have an ASP.NET project in VS2012. I'd like to publish an "offline" version of this site.
I'd like the installer, to:
Enable (or install) the IIS on Windows (if necessary)
Install the MS SQLExpress (if necessary)
Install the .NET (if necessary)
Install the project's files, and start the site on localhost.
Can you help me, how to start?
MSI packages (digitally signed) are the standard way of deploying Windows applications. You can use a tool like Advanced Installer, such tools offer predefined support to install Windows Features, prerequisites (SQLExpress or .NET Framework), install IIS web apps and of course copy your files and create the corresponding folders structure.
This application has a free edition, but for what you need you have to purchase a Pro license. It also has a full 30 days trial.
(disclaimer: I work on it)
If not going with #SLaks suggestion, you have to create either a script (powershell) or a installation package to setup all the components in your solution. There a a bunch of installation packages around (Wikipedia
I develop a web application on Microsoft .Net 4 and Entity Framework 5. When I upload the project on my web farm it doesn't work. I believe that Entity Framework is not installed on my web farm. So I contacted my host to support this particular issue.
They said:
Send us a download and installation instructions, with any
requirements to install Entity Framework.
Except we utilize a link from directly within Visual Studio through Nuget.
How do you load the proper deployment information onto a server, since you can't directly deploy with Nuget since they don't have Visual Studio installed?
Server Information:
Windows Server 2008 R2 64 Bit
Nuget link I used to install Entity Framework.
If possible please guide me or reference a place where I can solve this deployment issue. Any help would be greatly appreciated. Thank you for your assistance.
In order to successfully launch your project on a deployment server you should ensure that your application has a Deployment Package to be installed on the server.
Deployment Considerations can be found here:
You have a lot of things you need to consider, but Entity Framework does have a lot of choices and flexibility. Some of your choices:
Click Once Security and Deployment
Windows Installer Deployment
What Is a ClickOnce Application?
A ClickOnce application is any Windows Presentation Foundation
(.xbap), Windows Forms (.exe), console application (.exe), or Office
solution (.dll) published using ClickOnce technology. You can publish
a ClickOnce application in three different ways: from a Web page, from
a network file share, or from media such as a CD-ROM. A ClickOnce
application can be installed on an end user's computer and run locally
even when the computer is offline, or it can be run in an online-only
mode without permanently installing anything on the end user's
computer. For more information, see Choosing a ClickOnce Deployment
Strategy.
ClickOnce applications can be self-updating; they can check for newer
versions as they become available and automatically replace any
updated files. The developer can specify the update behavior; a
network administrator can also control update strategies, for example,
marking an update as mandatory. Updates can also be rolled back to an
earlier version by the end user or by an administrator. For more
information, see Choosing a ClickOnce Update Strategy.
Because ClickOnce applications are isolated, installing or running a
ClickOnce application cannot break existing applications. ClickOnce
applications are self-contained; each ClickOnce application is
installed to and run from a secure per-user, per-application cache.
ClickOnce applications run in the Internet or Intranet security zones.
If necessary, the application can request elevated security
permissions. For more information, see Securing ClickOnce
Applications.
How does a Windows Installer Deployment work?
Windows Installer
deployment enables you to create installer packages to be distributed
to users; the user runs the setup file and steps through a wizard to
install the application. This is accomplished by adding a Setup
project to your solution. When built, the project creates a setup file
that you distribute to users; the user runs the setup file and steps
through a wizard to install the application.
That is a brief description of a few ways, you can find examples here: Once you actually have your host load your deployment package it should run without any issues. Hopefully this points you in the correct direction.