How to publish ASP.Net website to remote machine? - asp.net

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.

Related

Publishing ASP.net to Azure VM

There is LOTS of information on publishing asp to Azure Cloud Web Service and so forth but I cannot find a lot on publishing it to an azure VM.
Also another problem is anything I find assumes I have started a project with azure enabled from the start. Which I haven't done, so I would have to somehow convert it, again I have seen many ways of doing this on the web based on different requirements.
So how would I publish an ASP.net project (that has no reference to azure) to an azure VM.
Thanks
Install Web Deploy into your VM and publish directly through Visual Studio
http://www.iis.net/downloads/microsoft/web-deploy

Missing Web Management Service on IIS (WIN8)

I have seen this asked here before, but none of the other posts solved my issue, so here goes nothing.
We are attempting to use Web Deploy on IIS to automatically deploy our application to a test environment. The idea, besides bettering our deployment process, is to allow Jenkins to deploy our application to IIS and run a few automated tests.
For this we are attempting to use MSBuild along with a deployment profile on our web app. The IIS lies on a Win8 virtual machine, where we try to run MSBuild and it fails because the Web Management Service is not up, and it doesn't show anywhere on the IIS management software.
I have the Web Deploy feature installed, as I have seen from Web Platform Installer, but the Web Management Service icon is nowhere to be found. I have found and started the service manually on the Windows Services configuration, but that doesn't seem to have helped either.
A few other observations:
"IIS: Management Services" item doesn't seem to show up on my Web Platform Installer;
I tried changing my installation (under Windows' Add an remove programs) to include web management, id didn't help
I enabled IIS' Web Management on Windows' "Add and remove features" settings. Also nothing shows up on my manager.
My Windows language is set to Portuguese. I may have missed the config due to bad translation, but that's unlikely.
So, how do I get the service to run so I can configure it on my IIS and finally deploy my application?
Client OSs doesn't come with Web Management Service. You cannot set up remote publishing using Web Deploy for a site that is hosted in IIS on Windows 8.0 or 8.1. You need server OS for same.

Migrate a ASP.Net application from one server to another server

I have developed a ASP.Net MVC 4 application with Visual Web Developer Express 2010. It was successfully published/deployed to a remote server A (development server) using the Web Developer's built-in publishing tool and it works perfectly on it IIS 7.0 with the web deployment component.
Now I want to deploy it to another remote server B (production server). This one sits in an isolated environment and does not have Internet access! Even if server B is a replica of server A, its IIS 7.0 does not have the web deployment tool component installed. So the built-in publishing tool does not work for the web deployment option.
I then tried to publish it using the File System option. I copied the exported files to a new folder on IIS on server B. The folder was configured the same way as its counterpart on server A. I tried the URL on server B and it just gave me directory/files listing on the browser instead of the welcome page of the application.
Has anybody got the experience or tips to solve the issue? Thanks.
Cheers,
Alex
edit:
because it a MVC site, the default document doesn't apply. check the following steps:
IIS Extension Less URLs are enabled and allowed.
ASP.NET 4.0 is installed and registered. C:\Windows\Microsoft.NET\Framework\<version> and then aspnet_regiis -i (this will typically force IIS to use the MVC infrastructure instead of using the default document methodology)
Ensure App Pool is in 4.0 Integrated mode.
Ensue that the IIS Advanced Settings for the website are showing the right root folder path.

How to run an ASP.NET web application without VS2010?

Say, I have an ASP.NET web application that I can run in a web browser by opening that solution in VS 2010 and then by going to Debug -> Start without debugging, or by pressing Ctrl+F5.
I was wondering if it's possible to create a link on my desktop to run the same web app but without starting VS2010 first? (Say, by just double-clicking such link.)
Yes, deploy the site to your local IIS
http://www.codeproject.com/Articles/32210/Deployment-of-a-Website-on-IIS
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/33e0a51a-5f8a-40f2-9923-cdd604e1a812.mspx?mfr=true
Create a windows batch file to start the ASP.NET Web Development Server and point it to your application's root directory.
Here's my .bat file:
"C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe" /path:"E:\NITIN" /vpath:"/MyApp" /port:2510
http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
http://www.dotnetperls.com/development-server-bat
Here is a great article describing how to set up your ASP.NET website in IIS. Thus letting it run outside of the visual studio development environment.
You can either upload the website to a hosting server so that the site is accessible from the internet, or you can setup IIS on your development machine and deploy your site to that.
Here is an msdn article with various links on how to go about doing this.
You Want to Run Asp.net Web Site Then U Need To Install IIS 6.0 or Higher in Your Machine..
And want to more guide then Check Out This Link..
https://www.youtube.com/watch?v=aFVcX5W0VEQ

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