Old Website Migrate to ASP.NET or VPS Running Windows/IIS

Ferrari-Dude

New Member
Hello, I have a really old (circa 1998) mostly static website, which was hosted on IIS running/Windows 2008R2 and which I need to preserve it as-is. I believe it uses some older tech like ASP and server-side includes.

Would your ASP.NET hosting service be suitable for this type of site OR would I need to purchase a VPS running windows, install IIS and configure?

Thanks in advance for any help you can provide,

-Don
 

Quags

Administrator
Staff member
It really depends on what versions are in use. Running a windows server can be complicated, and windows 2008 is end of life as far as I am aware. Generally I wouldn't recommend it unless you are familiar administrating a windows server.

Plesk, considered the best control panel for windows, does not recommend anything lower than windows 2019 due to security issues with all lower version (even 2016)

On our own asp plans:
  • Support Languages : PHP 5.2, 5.6, 7.1 7.2 & 7.3 - ASP.NET 3.5, 4, 4.5 - .NET core 2.1.4. 2.2 & 3.0 Supported - Classic ASP, ASPUpload, ASPJpeg, ASP.NET ToolKit, ASP.NET Framework 3.5 , 4.7 & 4.8
  • Modules Support : Silverlight, ODBC, ASP.NET MVC 6, 5 , 4. Additional modules can be installed upon request.

I'm not sure if this supports what you are using.
 

tony_maguire

New Member
Here's something that might be helpful:

Migrate controllers and views
In the ASP.NET Core project, a new empty controller class and view class would be added to serve as placeholders using the same names as the controller and view classes in an ASP.NET MVC project to migrate from.

The ASP.NET Core WebApp1 project already includes a minimal example controller and view by the same name as the ASP.NET MVC project. So those will serve as placeholders for the ASP.NET MVC controller and views to be migrated from the ASP.NET MVC WebApp1 project.

Copy the methods from the ASP.NET MVC HomeController to replace the new ASP.NET Core HomeController methods. There's no need to change the return type of the action methods. The ASP.NET MVC built-in template's controller action method return type is /dotnet/api/system.web.mvc.actionresult?view=aspnet-mvc-5.2; in ASP.NET Core MVC, the action methods return IActionResult instead. ActionResult implements IActionResult.
In the ASP.NET Core project, right-click the Views/Home directory, select Add > Existing Item.
In the Add Existing Item dialog, navigate to the ASP.NET MVC WebApp1 project's Views/Home directory.
Select the About.cshtml, Contact.cshtml, and Index.cshtml Razor view files, then select Add, replacing the existing files.

Migrate static content
In ASP.NET MVC 5 and earlier, static content was hosted from the web project's root directory and was intermixed with server-side files. In ASP.NET Core, static files are stored within the project's web root directory. The default directory is {content root}/wwwroot, but it can be changed. For more information, see Static files in ASP.NET Core.

Copy the static content from the ASP.NET MVC WebApp1 project to the wwwroot directory in the ASP.NET Core WebApp1 project:

In the ASP.NET Core project, right-click the wwwroot directory, select Add > Existing Item.
In the Add Existing Item dialog, navigate to the ASP.NET MVC WebApp1 project.
Select the favicon.ico file, then select Add, replacing the existing file.

Migrate the layout files
Copy the ASP.NET MVC project layout files to the ASP.NET Core project:

In the ASP.NET Core project, right-click the Views directory, select Add > Existing Item.
In the Add Existing Item dialog, navigate to the ASP.NET MVC WebApp1 project's Views directory.
Select the _ViewStart.cshtml file then selects Add.
Copy the ASP.NET MVC project shared layout files to the ASP.NET Core project:

In the ASP.NET Core project, right-click the Views/Shared directory, select Add > Existing Item.
In the Add Existing Item dialog, navigate to the ASP.NET MVC WebApp1 project's Views/Shared directory.
Select the _Layout.cshtml file, then select Add, replacing the existing file.
In the ASP.NET Core project, open the _Layout.cshtml file. Make the following changes to match the completed code shown below:

Update the Bootstrap CSS inclusion to match the completed code below:

Replace @Styles.Render("~/Content/css") with a <link> element to load bootstrap.css (see below).
Remove @Scripts.Render("~/bundles/modernizr").
The completed replacement markup for Bootstrap CSS inclusion:

HTML

<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
Update the jQuery and Bootstrap JavaScript inclusion to match the completed code below:

Replace @Scripts.Render("~/bundles/jquery") with a <script> element (see below).
Replace @Scripts.Render("~/bundles/bootstrap") with a <script> element (see below).
The completed replacement markup for jQuery and Bootstrap JavaScript inclusion:

HTML

Copy
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
The updated _Layout.cshtml file is shown below:

CSHTML

Copy
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
</footer>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
@RenderSection("scripts", required: false)
</body>
</html>
View the site in the browser. It should render with the expected styles in place.

Hope this helps.

Regards,
Tony
 
Top