Results 1 to 2 of 2

Thread: Understanding Visual Studio & IIS - test environment

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2013
    Posts
    9

    Post Understanding Visual Studio & IIS - test environment

    Greetings,

    So, a bit of background - I was taught some basic ASP.NET VB programming skills in the mid 2000's. I had a mentor who retired many years ago and have been "on my own" ever since. I have an IIS server (win 2019 server) and basically use Visual Studio 2019 to open a shared folder on the local drive of the server to edit code and it immediately becomes live.

    Over time and a bunch of trial and error, I've upgraded Visual Studio a few times, the server IIS a few times, and .NET framework that runs in IIS from 2.0 to 4.5 over the years.

    I want to make some major changes to my production code and believe it best I create a test environment. I only have the one server.

    In the past, I've created a new test "application" and manually copied individual pages from test to the actual production link. This works ok.

    Is there a better way without another IIS server?

    I also want to test .NET 5.0 (since 4.5 is out of support). I had planned to do this by creating another website link in IIS and installing 5.0, and changing the option in IIS to use 5.0 to test, yes?

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,549

    Re: Understanding Visual Studio & IIS - test environment

    Quote Originally Posted by data1025 View Post
    ...basically use Visual Studio 2019 to open a shared folder on the local drive of the server to edit code and it immediately becomes live.
    That is a recipe for disaster, any mistakes or errors you create will have an immediate impact on you production environment. You would be better developing locally, using IIS Express (which is installed as part of VS) to debug and test your code on the local machine. Only update the actual server when your code is proven to be working.

    I would also strongly recommend looking at using something like Git (also installed as part of Visual Studio) to manage your source code, you can get free git hosting from Github, Azure Devops, and other places as well.

    Quote Originally Posted by data1025 View Post
    I want to make some major changes to my production code and believe it best I create a test environment. I only have the one server.

    In the past, I've created a new test "application" and manually copied individual pages from test to the actual production link. This works ok.
    Ideally you should have a second server as a test environment, although you could potentially host multiple websites on a single IIS you need to be very careful if the single server is both production and test - especially if you are using different versions of dotnet on the same server.

    Quote Originally Posted by data1025 View Post
    I also want to test .NET 5.0 (since 4.5 is out of support). I had planned to do this by creating another website link in IIS and installing 5.0, and changing the option in IIS to use 5.0 to test, yes?
    If you are looking at moving to the newer versions of dotnet (formerly called .net core) then you might want to skip 5 and go to 6 as 6 is the current Long Term Support version., 7 is out but not LTS, 8 is due next month and will be the new LTS version.

    .Net core is quite a bit different to the existing Framework versions, for starters it doesn't actually require IIS to host a web app (it also runs on Linux and Macs as well as Windows, Docker / Container support is also pretty nice). There is an upgrade tool freely available which can make upgrading quite straight forward https://dotnet.microsoft.com/en-us/p...rade-assistant however if you are using VB.Net I am honestly not sure how well this is supported on .Net core.
    Last edited by PlausiblyDamp; Oct 15th, 2023 at 03:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width