• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

I can't delete extra site

You are not authorized to post a reply.
Sort:
Page 1 of 212 > >>


New Member


Posts:26
New Member

    I'm not sure how I did this. At one point I think I added a second site when I was learning DNN:

    I have a second site that shows in settings > site settings and of course I can see it in my folder structure's portal folder. How do I delete it? It's not showing in manage > sites where I think you are supposed to be able to delete sites when you hover on them?



    Veteran Member


    Posts:478
    Veteran Member

      If the second site is not shown in the manage>sites page, it would seem that at least important parts of it have been deleted.

      Check to see what is in the database's Portals table. There should be one entry for each portal.

      Also, look at the files directory. The /portals directory should have subdirectories for other sites.

      If there are no other entries than the single portal in the Portals table, you won't be able to use the UI to delete them. You can go into the file system and delete subdirectories of /portals that correspond to other sites. I think that it's not worth your time/effort to delete data from other database tables, and this its likely to cause you more problems if you don't get it right.

      In any event, make good backups of the database and file system before you start poking around.
      Joe Craig
      DNN MVP
      Patapsco Research Group


      Veteran Member


      Posts:557
      Veteran Member

        I have seen this for a site without Portal Alias. After I added that, I was able to delete it.



        New Member


        Posts:26
        New Member

          Thanks! I tried adding the alias back but I still couldn't delete it and it's still not showing in manage > sites. Very odd. I think really messed something up trying to clean up the web.config. It's definitely there because I can see it's directory and it's showing in the sql console when I run SELECT * FROM portals;

          Anyhow I think you're right Joe I will just ignore the database it and delete the directory after a backup


          Veteran Member


          Posts:557
          Veteran Member

            Posted By Agency3 on 12 Jul 2019 10:54 AM
            Thanks! I tried adding the alias back but I still couldn't delete it and it's still not showing in manage > sites. Very odd. I think really messed something up trying to clean up the web.config. It's definitely there because I can see it's directory and it's showing in the sql console when I run SELECT * FROM portals;

            Anyhow I think you're right Joe I will just ignore the database it and delete the directory after a backup

            If you can get to the Portal, try saving the portal settings and see if that helps.
            I'm sure there's something missing in the DB, which makes the SQL to get the portal fail.

             

             



            New Member


            Posts:26
            New Member

              I added the alias back and now the site re-appeared in the manage > Sites. But if I hit delete I get  an internal server error:

              POST http://uat.workauthority.ca/API/PersonaBar/Sites/DeletePortal?portalId=1 500 (Internal ServerError)
              send @ jquery.js?cdv=230:11
              ajax @ jquery.js?cdv=230:11
              rawCall @ sf.js?cdv=230:89
              call @ sf.js?cdv=230:100
              post @ sf.js?cdv=230:104
              value @ SitesListView.js?cdv=230:1
              (anonymous) @ SitesListView.js?cdv=230:1
              (anonymous) @ export-bundle.js?cdv=230:98
              (anonymous) @ SitesListView.js?cdv=230:1
              (anonymous) @ util.js?cdv=230:141
              dispatch @ jquery.js?cdv=230:6
              q.handle @ jquery.js?cdv=230:6
               

              There are so many weird things going on. I can't set the primary site because there is no edit button beisde it. I cant toggle between auto add alias because the button is greyed out. Also when I select the site from the editing site dropdown at the top of the persona bar page,  it doesn't properly refresh the alias listed. I have to flip between tabs to get it to refresh.



              Veteran Member


              Posts:305
              Veteran Member

                I know it will sound a bit odd, but you can't set the primary site alias when browsing it from the alias you wish to make it primary.  For example, if you want your primary alias to be example.com and you're currently visiting on example.com, then you can't set that alias.  You'd have to browse and do this from a different domain name.  :)

                As for the error you reported, that's a client-side error message.  Do you happen to have the server-side error message as well?  You can get that from the Admin Logs and/or the Log4Net log file in the /Portals/_default/Logs/ folder.

                Will Strohl

                Upendo Ventures Upendo Ventures
                DNN experts since 2003
                Official provider of the Hotcakes Commerce Cloud and SLA support


                New Member


                Posts:26
                New Member

                  That's why I'm confused because now neither site is marked as primary. I'm guessing I shouldn't have tried to add a second site without adding the subdomain first through the webhost panel? (I now realize I don't have access to it and have to get IT to do it) Because I can't delete the site or log into it by visiting staging.workauthority.ca

                  Anyhow here is the server side error:

                  2019-07-21 15:52:50.221-04:00 [vserver243][D:85][T:125][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\inetpub\vhosts\uat.workauthority.ca\httpdocs' denied. ---> System.ComponentModel.Win32Exception: Access is denied
                     --- End of inner exception stack trace ---
                     at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode)
                     at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo)
                     at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter)
                     at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath)
                     at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId)
                   



                  Veteran Member


                  Posts:478
                  Veteran Member

                    Sites are neither primary or secondary.

                    Those terms go with portal aliases. You can assign a site's portal alias a primary.

                    If you can get to one of the sites, say myportal.com you should be able to login and get to the Manage/Sites Persona Bar control. Then you can edit the other site. If you give it a portal alias, say myportal.com/other, then you should be able to browse to that site, login, and control it.

                    Separately, you can adjust DNS and IIS bindings for the other site.
                    Joe Craig
                    DNN MVP
                    Patapsco Research Group


                    New Member


                    Posts:26
                    New Member

                      I just did a test on a local install and I managed to do the same thing again!

                      2019-07-21 16:47:08.055-04:00 [DESKTOP-OK4SJ8I][D:2][T:64][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\Users\DrFish\Documents\wa\Website' denied. ---> System.ComponentModel.Win32Exception: Access is denied
                         --- End of inner exception stack trace ---
                         at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode)
                         at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo)
                         at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter)
                         at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath)
                         at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId)
                      2019-07-21 16:49:23.517-04:00 [DESKTOP-OK4SJ8I][D:2][T:62][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\Users\DrFish\Documents\wa\Website' denied. ---> System.ComponentModel.Win32Exception: Access is denied
                         --- End of inner exception stack trace ---
                         at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode)
                         at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo)
                         at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter)
                         at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath)
                         at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId)
                       

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      4. No Flaming or Trolling.
                      5. No Profanity, Racism, or Prejudice.
                      6. Site Moderators have the final word on approving / removing a thread or post or comment.
                      7. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved