locked
Publishing asp.net project RRS feed

  • Question

  • User1553576423 posted

    Hi, I'm new to asp.net and mvc and I am having problem deploying it. I follow to videos and documentation but I can't get it to work. In one of the microsoft video that i watched, it said that after publishing go, just do dotnet run appname.dll, but it gives me "Object reference not set to an instance of an object", in the video by doing that command it works and can open website in localhost:5000. The other one is after publishing there are already appname.exe, but in my case there is no .exe in the publish folder. how can i publish my website?

    Friday, June 10, 2016 4:29 AM

Answers

All replies

  • User-166373564 posted

    HI,

    You can test your application more reliably in these ways before deploy it to production server:

    1. Deploy the application to IIS on your development computer by using the same process that you'll use later to deploy it to your production environment. You can configure Visual Studio to use IIS when you run a web project, but doing that would not test your deployment process. This  method validates your deployment process in addition to validating that your application will run correctly under IIS.

    2. Deploy the application to a test environment that is nearly identical to your production environment. Since the production environment for these tutorials  is Web Apps in Azure App Service, the ideal test environment is an  additional web app created in Azure App Service. You would use this second web app only for testing, but it would be set up the same way as the production  web app.

    Reference: ASP.NET Web Deployment using Visual Studio: Deploying to Test

    Have a good day.

    Angie

    Friday, June 10, 2016 8:43 AM
  • User1553576423 posted

    The problem is when I'm using .NET Core, there is no problem in using the .NET Framework. And I cant see any updated guide to publish the .NET Core, I don't see the dnx thing u choose when publishing.

    Friday, June 10, 2016 9:00 AM
  • User-166373564 posted

    Hi,

    The problem is when I'm using .NET Core, there is no problem in using the .NET Framework. And I cant see any updated guide to publish the .NET Core, I don't see the dnx thing u choose when publishing.

    There is guide of deploying an ASP.NET Core web app to Azure using Visual Studio, see: https://docs.asp.net/en/latest/tutorials/publish-to-azure-webapp-using-vs.html 

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 17, 2016 2:42 AM