I had an asp.net project that I backed up periodically. I still have it, but the 'solution file' is stored by Visual Studio in a different folder than the code, and I never realized I should back that up too. So now I've lost the solution file, but
I still have the asp.net pages.
I can't just create a new solution and import all the pages, because the old site was a 'web site' not a web application. I did get advice on this forum to install extra features of Visual Studio that would let me create earlier types of solution files,
which I did, but that won't compile a website properly either.
I do see choices such as:
ASP.NET EMPTY WEB SITE
and
ASP.NET WEB FORMS SITE
I started just now again to create the first (empty web site) and add the pages to it, and then add nuget packages that apply. But for example, in the following code:
Imports System.Collections.Generic
Imports System.Globalization
Imports System.Linq
Imports System.Web
Imports Microsoft.AspNet.Identity
Imports System
Imports Microsoft.VisualBasic
Imports Microsoft.AspNet.Identity.EntityFramework
Imports Microsoft.Owin.Security.DataProtection
Imports System.Security.Cryptography
Imports Microsoft.AspNet.Identity.Owin
Public Class TravisIOroutines
Private Shared Provider As DpapiDataProtectionProvider = New DpapiDataProtectionProvider("rateForSuccess")
Private Shared userManager As New ApplicationUserManager
Private Shared roleManager As New ApplicationRoleManager
Public Shared Function getUserManager() As ApplicationUserManager
Return userManager
End Function
Public Shared Function DeleteUser(ByVal username As String) As Boolean
Dim ir As IdentityResult
Dim user = GetUserByName(username)
ir = userManager.Delete(user) ' THIS WILL NOT COMPILE
If ir.Succeeded Then
Return True
Else
Return False
End If
End Function
"userManager.delete' will not compile. 'usermanger' has no 'delete' method.
I can't just create a new solution and import all the pages, because the old site was a 'web site' not a web application.
Web Site project do not have project files and simply exist in a folder. Click the File menu -> Open - Web Site. Then navigate to the folder that contains the Web Site and open. This is a main features of a Web Site project.
If the original solution also contained library projects then add the projects to the solution. Same concept as above, just navigate your file system to the project folder then open the project file. The project file is always within the project folder.
A solution file simply has the path to the projects.
Member
61 Points
111 Posts
How do I resurrect an old asp.net website (not webapp)
Apr 15, 2020 05:32 PM|RateFor|LINK
I had an asp.net project that I backed up periodically. I still have it, but the 'solution file' is stored by Visual Studio in a different folder than the code, and I never realized I should back that up too. So now I've lost the solution file, but I still have the asp.net pages.
I can't just create a new solution and import all the pages, because the old site was a 'web site' not a web application. I did get advice on this forum to install extra features of Visual Studio that would let me create earlier types of solution files, which I did, but that won't compile a website properly either.
I do see choices such as:
ASP.NET EMPTY WEB SITE
and
ASP.NET WEB FORMS SITE
I started just now again to create the first (empty web site) and add the pages to it, and then add nuget packages that apply. But for example, in the following code:
"userManager.delete' will not compile. 'usermanger' has no 'delete' method.
Any help is appreciated.
All-Star
53761 Points
24071 Posts
Re: How do I resurrect an old asp.net website (not webapp)
Apr 15, 2020 06:26 PM|mgebhard|LINK
Web Site project do not have project files and simply exist in a folder. Click the File menu -> Open - Web Site. Then navigate to the folder that contains the Web Site and open. This is a main features of a Web Site project.
If the original solution also contained library projects then add the projects to the solution. Same concept as above, just navigate your file system to the project folder then open the project file. The project file is always within the project folder.
A solution file simply has the path to the projects.