0

I have created an ASP.NET web application using visual studio.

Here is the github repository

Currently, a webpage on my website looks like this I only make changes to index.html.

Now that I want to deploy this ASP.NET application on my website, I assumed I would just upload the files to the server, unfortunately, the result does not look like what visual studio displays.

Here is what the webpage currently looks like.

What changes do I need to make to my ASP.NET application so that it will be displayed properly on my website?

0

2 Answers 2

2

Basically before deployment you need to make sure following

  1. The server has same or updated version of .Asp.net framework installed, as required by your Asp.net application
  2. If there are any database connection strings in web.config files then they must be changed to appropriate live database connections.

Then you need to Publish the web application from visual studio. Publishing process will compile your application and will create a full package containing Dll, images, styles and aspx/html files + config files.

Before publishing starts, visual studio will ask you to create a public profile and there you need to specify Path and Build mode (debug or Release). Path can be of your local machine Or directly of live server (I prefre local though)

Once publish succeeds, you are ready to copy the entire publish folder to live (if your publish path was local).

For more information on deployment read following MSDN reference Deployment process

Sign up to request clarification or add additional context in comments.

Comments

2

Which webserver you are using?

The http://devinhaslam.com website is hosted from a apache webserver. If you want run a .net website on a apache you need asp.net core check this https://learn.microsoft.com/en-us/aspnet/core/publishing/apache-proxy

If you run the website on a IIS, you must only publish the bin folder. Check this documentation https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx

2 Comments

I'm a little new to asp.net. I do want to publish the code to devinhaslam.com, so that means that I would need asp.net core. The link wasn't that helpful for me. Would I just need to add asp.net core to my project and then click the "publish" option in visual studio?
No, if you want publish your website on a apache webserver you must start a new project in Visual Studio 2017 you found the project type ASP.NET Core Web Application and you need root access to your webserver you must change something of the config. If you have only a webspace package i think it not work. A other howto: Deploying and hosting ASP.NET Core applications on Ubuntu Linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.