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.
Related
Can someone explain or refer to a document on how a blazor web assembly app is served by dotnet.exe process?
So here is what I have done and what I know.
Scaffolded a new blazor web assembly project using the command dotnet new blazorwasm -o BlazorTest.
Ran the project using the command dotnet run and it runs as expected.
Remember I am not using the --hosted parameter to include ASP.NET Core server.
As far as my understanding goes, the output of blazor web assembly project are set of static files which run inside of a browser process. In order for these files to run inside of a browser we need a web server like kestrel/iis or a cdn to serve these files.
Now my question is, in the current setup where is that webserver or cdn present which is required to serve the files?
The dotnet CLI is reading your Properties\launchSettings.json file.
The default profile launches the app using IIS Express.
If you want use the other Kestrel launch profile that is included in the template, you can use:
dotnet run --launch-profile "BlazorTest"
Note: The "project" profile will be scaffolded as the name of the app you specified in dotnet new
i have successfully upload my Asp.net core 1.01 website to Ubuntu 14.04 Vultr VPS with Nginix.
The problem is that whenever i change in my code on local development machine and upload published folder dll to server, its required to restart the application or server to view updated contents.
is someone help me to that without application or server restart. so i can just upload updated dlls via FTP and its show updated contents.
thanks
Use dotnet-watch
dotnet watch is a tool that runs a dotnet command when source files change. For example, a file change can trigger compilation, tests, or deployment.
I am using Web Deploy for publishing an ASP.NET MVCwebsite in Visual Studio 2010.
Is there any way to run a .bat file on server after this publish automatically?
See: Post Publish Events
You could create a Windows Service that runs on your IIS box and uses the FileSystemWatcher to monitor changes to your web root path and when it detects a file change run a batch file.
What are the types of deployment we have in asp.net?
Till now what I am doing?
I use to publish my website in any folder than copy paste the compiled file to the inetpub folder [where my website is configured with the IIS]. I am not sure what kind of deployment this is, is it XCOPY? But I am not using any command line tool.
So you have the following options
xcopy deployment
Compile your asp.net application and copy all the files to your server. You can do this by using FTP or shared directories. (Or anything else to transfer files.)
WebDeploy
You have the possibility to deploy your asp.net webpage directly form your Visual Studio. If you go to "Build" and you choose "Publish Web". To be able to to do this you have to configure your server before. But this works automatically after you have set up everything. It's very handy since your deployment becomes easy to rebuild.
http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx
Web Setup - Installer
Visual Studio provide also the option to build an installer. This works like installing usual software on your windows computer with the installer wizard. (See the link)
http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Manage multiple server
There is also a way of managing the deployment of multiple servers. It seems to be a bit more complicated but could be interesting for professionals. (Check out on Google Microsoft Web Farm Framework 2.0
To answer your question: yes, what you are using is called xcopy deployment. Even though you do not type xcopy . ... it is still a 'plain copy' and therefore called xcopy deployment.
I have made a web application using Visual studio 2008. till now it was running on my local host..
Now i want to load it onto the server so that it can run on my company server.
How do i do that..??
Thanks
In visual studio:
Under the Build menu, select Publish
In the publish dialog, select a location to publish your application to
ex: \\server\c$\inetpub\wwwroot
Set your publish options. I reccomend using the "Only files needed to run this application" setting
Click the Publish button
You will have to mark your deployment directory as an application in IIS for IIS to run your code. See this MSDN article for details on how to do this.
You just need to copy it into the IIS directory on that server, usually c:\inetpub\wwwroot. Make sure you have asp.net installed.
You can use the project menu and copy it to a remote server (specifically the machine that will host this project, in addition a web server). Or you can just go to the remote machine, add a new site and store the .aspx pages and all related images on the web servers inetpub\wwwroot folder.