How to publish Asp.net application on the remote server in TFS - web-deployment

I am developing a web application on client remote machine; this application is using the TFS as source explorer. so, when we commit the code related to any functionality, then the application is published on another remote machine DBXYZ under DEBUG/RELEASE folder, TFS is installed on the same remote machine DBXYZ.
Debug - for staging enviornment
Release - for Production enviornment
now i need to create a new third folder for QA with Debug/Release folder on remote machine DBXYZ and create a new copy for Debug/Reales folder publish file in this new QA folder.
so i am not getting where it's defined on my local machine or remote machine.

Related

ASP.NET MVC project to push to a remote server

I have a ASP.NET MVC project locally, but want to push to a remote server so that others can use that website. I have login access to the remote server.
Is this what i need to do?
1) add a folder to IIS in the remote server
2) copy my files to the folder on remote server. If so, which files should i copy?
If you're using Visual Studio (not code) then right click on the project and select publish, then select the options to publish to a local folder. Copy all files in your published folder to your server.
If you're using ASP.NET Core then you can also navigate to the project folder and use the following command
dotnet publish -c Release -o PUBLISH_PATH_HERE
You will need to ensure that the server has your version of .NET runtime installed.
Create a release publish profile, publish, grab the files from the directory it published to. This is the simplest way. You can automate this process if you have many releases. For example publishing directly to the server or checking code into a source control of some kind and having it publish to the server.

How to setup Visual Studio project FTP to a remote IIS Server?

I have an ASP.Net project that I've been working on my local machine and I've successfully uploaded my application files from my local machine to the remote IIS server. My issue occurs when I make changes to my code through the IIS remote server, sometimes the changes that I have made do not appear or work. The way I fixed the problem was upload the updated project into the IIS server.
I've read a bunch of articles online and some people are mentioning the IIS cache or temp file that must be cleared.
Is there a way for me to establish an FTP connection from my local machine to the remote IIS server so that when I push changes it would automatically update the code?
You can publish your website by using visual studio publish tool. Which will automatically deploy code to your FTP location on publish. You just need to configure your FTP remote server. Right click your website project and click publish
Then select IIS,FTP from side nav and click publish
Then select FTP from Publish method drop down and start configuring your application and after that click on Validate Connection to test if it had connected to FTP properly and click next and complete configuration and your code will be deployed to that FTP remote server

How to use msdeploy to deploy an existing website on remote server

I already created a website "MyWebsite" on IIS on Windows server 2012, the physical path is C:\builds\MyWebsite\wwwroot, there are 1 other folders approot under directory C:\builds\MyWebsite, which is also necessary to make the website run. What I want to do is:
create a new folder C:\builds\MyWebsiteNewBuild in remote server which will be used to put my new build;
dump my new build D:\Release\PublishOutput from my local machine to the remote server, the publish output has 2 sub folders: wwwroot and approot;
change the physical path of "MyWebsite" to the new created folder C:\builds\MyWebsiteNewBuild\wwwroot, and restart the service.
I am new to the msdeploy, I searched and it seems that I can use
msdeploy.exe -verb:dump-source:contentPath="D:\Release\PublishOutput" -dest:contentPath="C:\builds\MyWebsiteNewBuild",computerName="https://**.**.**.**/MsDeploy.axd",userName='administrator',password="*****",authType='Basic' -allowUntrusted
to dump my new build to remote server's destination folder, but the other requirements, such as change the physical path of my existing website, I don't know how to do.
You could change the website path using the appcmd through WebDeploy by using a manifest.
<runcommand path="%windir%\system32\inetsrv\appcmd set app /app.name:"Default Web Site/app12" /[path='/'].physicalPath:C:\temp\app12" waitInterval="5000"/>
http://www.dotnetcatch.com/2016/06/28/webdeploymsdeploy-quick-tip-change-iis-siteapp-physical-path-with-msdeploy/
The following post describes how to create a custom WebDeploy package based on a manifest:
http://www.dotnetcatch.com/2016/06/23/deploy-an-asp-net-website-not-web-application-with-msdeploy/

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.

Opening web project set to IIS directory in machine without IIS, pointing to embedded server

I can open a web project in TFS; however, in my QA environment I have to change it to use IIS. In my local dev environment, I don't have IIS and can't install it.
New company rules deny access in QA to me and I can't open my web project to fix it in my machine.
When I open the project I receive "The Web Application Project ... is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account." Then I open as administrator but VS asks for the virtual directory to be creatred on my IIS.
The NgM link can really help, but if you need a step-by-step way than go to your .csproj file property. Make it writable, open it in a text editor and search for <UseIIS>True</UseIIS> turn it to <UseIIS>False</UseIIS>. Open solution, get the latest version and when you receive a warning, keep the local version of your modified .csproj. You can too check-in your modified .csproj to stop troubles in the next latest version.
bye

Resources