locked
How do I resurrect an old asp.net website (not webapp) RRS feed

  • Question

  • User297437924 posted

    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.

    Any help is appreciated.

    Wednesday, April 15, 2020 5:32 PM

Answers

  • User475983607 posted

    RateFor

    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.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 15, 2020 6:26 PM