What is Publishing?
The web application goes through the following standard procedure before hosting to the Server.
- Developing an application
- Publishing an application
- Hosting an application on IIS
Step 1: Create an ASP.NET MVC Application
Watch video which explains how to create ASP.NET MVC application step by step
Step 2: Publish an Application
Now, click the previously shown Publish option. It will open the Windows, mentioned below.
Step 3: Select Publish Target
In the preceding image, we have seen that there are many options listed to publish the application, let's learn about them in brief.
- Microsoft Azure App Service
- Import
- Custom
- Microsoft Azure API apps
- Microsoft Azure virtual machine
There are many other options to publish the Application, using which we can publish .NET application.
Step 4: Create Publish profile
Now, give the profile name as per your requirement and click ok. It will create the custom profile, as per your given name.
Step 5: Choose Publish Method
Now, choose the file system method from preceding methods and click Next button.
Step 6: Choose File System Location
In the preceding screenshot, we have selected the target location E drive to store the published code. It may be different in your case, as per you machine, No click Next button.
Step 7: Choose Publish code type
Now, let's learn in brief about debug and release option.
- Debug: Choose this option when you want to debug your application after the hosting.
- Release: Choose this option when you do not want to debug the Application after hosting and make the application faster .
Step 8: Preview the configuration
Now, click Publish option and watch the output Window, as shown below.
Now, as shown in the preceding screenshot's highlighted section, our application code is published in our specified file system location. Now, navigate to the target folder and see the published code and files as shown below.
Preceding is our published code, which is used to host in IIS. I hope from all the preceding examples, we learned how to publish ASP.NET MVC application in File system.
Note
- Choose the publish target location, as per your system.
- Select proper publish method, as per your requirement.
- These Publish steps are different in Visual Studio 2017
Next Article
Summary
I hope, this article is useful for all the readers. If you have any suggestions, please contact me.- Subscribe my YouTube Chanel Compile Mode
- Subscribe free email alert of compilemode.com
- Like Facebook page .
- Follow on Twitter.
- Share to your friends













