DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Running the DDN Site from Local Host

Sort:
You are not authorized to post a reply.





New Around Here





    Hi Friends

    It is request to please guide. I have DNN Site deployed on Azure. I want to Run, Debug and Test this Site on my local Machine (Local Host). It is request to please guide me how I will do this.

    Thanks

    Anil






    Veteran Member





      you need to have local IIS website configured (with edit permission for the ASP.Net App Pool user) and SQL Server
      copy over files and database backup.
      Create local database from backup and a SQL Server account to use, which needs to be granted DB Owner permission for the database. In web.config file edit connection string to match your database.
      edit system32/drivers/etc/hosts file with a text editor and provide a proper local domain name for your local IP (e.g. "DNN").
      Bind this name to your local website.
      Browse to your website.
      Edit PortalAlias database table and make sure, your local name is a primary website alias for your site (e.g. overwrite existing primary alias.





      New Around Here





        Dear Sebastian Leupold

        Thanks for your promt reply. I will check and confirm.

        Regards

        Anil






        New Around Here





          Dear Sebastian Leupold

          I did the following:

          1: Restore the DDN UAT Azure SQL Server Database on Local Instance.

          2: Change the default in PortalAlias table (HTTPAlias = dnn.localhost.com).

          3: edit the Host file under C:\Windows\System32\drivers\etc

          127.0.0.1       dnn.localhost.com

          4: Place the DNN Website Folder under C:\inetpub\wwwroot\

          5: Add Website in IIS

          6: Enter the (dnn.localhost.com) as Host Name in Bindings.

          When I browse the Site following message appears: would you please guide me what I am doing wrong ??

          Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

          Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

          Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

          Source Error:

           

          An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


          Assembly Load Trace: The following information can be helpful to determine why the assembly 'Newtonsoft.Json' could not be loaded.
           

          WRN: Assembly binding logging is turned OFF.
          To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
          Note: There is some performance penalty associated with assembly bind failure logging.
          To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
          


          Stack Trace:
           

          [FileLoadException: Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
          
          [FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
             System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
             System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
             System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
             System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
             System.Reflection.Assembly.Load(String assemblyString) +35
             System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49
          
          [ConfigurationErrorsException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
             System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +762
             System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
             System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167
             System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238
             System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78
             System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334
             System.Web.Compilation.BuildManager.ExecutePreAppStart() +178
             System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746
          
          [HttpException (0x80004005): Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
             System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
             System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
             System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737
          

           

          You are not authorized to post a reply.

          These Forums are dedicated to the 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. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. 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.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. 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