Remotely publish ASP.NET 5 to IIS - asp.net

I've got an ASP.NET 5 project that I'd like to deploy to a remote server. I don't have remote desktop access to this machine, otherwise I could follow the same method most people use when deploying to IIS.
I'm able to deploy to my IIS 8.5 just fine on the same machine as my development. First I package my project to get the approot and wwwroot directories. Then, I point IIS to my wwwroot, and all works fine.
The problem is trying to deploy remotely. Normally I would zip up my MVC 5 project and use the IIS gui to 'import' an application.
That doesn't work for my MVC 6 project. Either I'm zipping it up incorrectly or MVC 6 projects can't be deployed this way.
How do you publish a vNext application to a remote IIS server?
Edit:
Just FYI, I am using Microsoft's Web Deploy Remote Agent to deploy this to the server. http://www.asp.net/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-(remote-agent)
It works perfectly for MVC 5 apps, because developers can easily deploy web apps and IT can restrict access to the machines, but the problem is trying to deploy MVC 6 apps using this agent.
I'm not questioning how to deploy MVC 6 projects to IIS, because that's already answered Here, this is concerning how to remotely deploy to IIS.

I solved this by updating to Web Deploy 3.6. The newest version includes a specialized provider for deploying ASP.NET 5 applications.
Details on how to use it can be found with this blog post:
http://azure.microsoft.com/blog/2014/08/11/web-deploy-3-6-beta-released/
The download link is as follows:
http://www.microsoft.com/en-us/download/details.aspx?id=43717
Use the contentPathLib provider or enable contentlibextension.
Example usage:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3> msdeploy
-verb:sync -source:iisapp=C:\release\Publish\wwwroot -dest:iisapp="Default Web Site/ExampleApp",computerName=machinename -enablelink:contentlibextension
To my knowledge, there isn't a GUI supporting these deployment methods yet. I assume this is because vNext is in Beta, and is expected to have breaking changes.

Related

HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process - Azure App Service dotnet 5

I am deploying 2 different projects in an azure web app service. The service is configured to be running dotnet 5. I am using virtual directory to deploy 3 applications in this app service. The default app, a dotnet 5 app, runs fine. On the first subsites if I deploy a dotnet 2.1 app, that works perfectly. But when I try to deploy a dotnet 5 app on the second subsite it shows the mentioned error in question - added an image of it
As far as I understood this is probably happening because they share same application pool. I tried the following stuffs:
Deployed as a self-contained app
Added AspNetCoreModuleV2 and out of process tags in csproj files of all projects as per this answer (and a few more answers from that link)
Frankly speaking I couldnt find much help in the net and not really sure how to proceed with this.

How to publish ASP.Net website to remote machine?

I am trying to publish the ASP.Net site in IIS to a remote machine.
Presently I am publishing the site local file system and copying that folder to remote machine using mstsc tool.
Is there any way I can directly publish to remote machine?
Sure there is,
You have to make sure web deployment service is running on your server. You can check these articles to find out how to install the web deployment. Here or here.
Once your web deployment service is running and configured you need to configure your publishing settings. In Visual Studio right click on your solution project, choose Publish and select the Web deploy or Web deploy package as your publish method setting. Good article describing web deployment scenarios can be found here.
Hope that helps you.

How to publish ASP.NET Core 5 Web Site to IIS?

I installed Visual Studio 2015 RC and created the sample Web Site project.
I published it in Visual Studio using its publishing tool to file system. The output is:
I tried to target IIS both this folder and wwwroot folder but nothing changed. I always receive an Access is Denied error.
Checked the permissions. They are OK. I'm always able to run my other web sites...
I want to publish it targeting clrcore. But I already tried to publish it using clr and failed there too. It is the same error.
How is the publishing process should be when I want to run a coreclr website in IIS? And I don't even know if it is possible to serve a coreclr project on IIS.
By the way there is nothing about .NET Core in application pools dialog in IIS. So I don't know what could my poor IIS do here.
There are full instructions from MS:
http://docs.asp.net/en/latest/publishing/iis.html
TL;DR
You need to install HTTP platform Handler. Other than that, if you could get a standard MVC 5 app to work, you should be ok. The only change I needed to make was installing the plstform handler.
Of Course, In VS I publised to a folder, then copied the contents to the Web server. The root folder to the site must point to the wwwroot and the approot will be at the same level.
As far as I know, You can't host ASP.NET Core 5 Web Site on IIS, it works with self hosting only.

How to host an ASP.NET Web Applications site on IIS 7

I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.
The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?
I tried to following:
I copied my entire project directory (so including the .csproj file, the bin folder etc.) to the following location on the remote server, where IIS is running C:\MyProject.
In IIS manager i added a Virtual Directory under Default Web Site. Located my Web Site files in C:\MyProject and added that folder. Then in IIS manager i converted that Virtual Directory to an Application.
But when i browse to my Web Site i get an error:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.
So my question is, what do i have to do in order to run my Web Site on IIS..?
The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.
SoL:
Create a new apppool with classic mode and .net framework equals to your application developed framework.
attach the newly created apppool to your virtual directory.
Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.
If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.
Update .net framework in the server to 4.0 if you have only 2.0.
Then register .net 4.0 version in IIS by running the following command in command prompt.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Try changing Application pool to Classic. To do that open Advanced settings of your application in IIS manager and change Application Pool. There should be "ASP.NET v4.0 Classic" or something similar according to your framework version.
http://technet.microsoft.com/en-us/library/cc731755(v=ws.10).aspx

asp.net website deploymnet on client

I have completed building a website for a client.Now i want to deploy this website on the server, So that client can access the website like a normal website. what is the best way to do it.
I am using C#,asp.net 3.5, Ms Access.
Thanks
Do you want to protect the source code as well?
YES
Install the Web Deployment Project for Visual Studio (there is on for VS2008 and other for VS2010)
Add that project to your solution
Add a Web Setup project to your solution
Tell the Web Setup project that to load the Deploy project as source
Build the Solution
You will have in the Web Setup folder a setup.exe and Website.msi ready to be installed in any client machine (client needs to have IIS)
NO
Add a Web Setup project to your solution
Tell the Web Setup project that to load the Web Site project as source
Build the Solution
You will have in the Web Setup folder a setup.exe and Website.msi ready to be installed in any client machine (client needs to have IIS)
All 3 projects, Web Site + Deploy project + Setup Project

Resources