YAFLogo

rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
Good morning, I have updated my forum and the procedure seems to have been successful but when I click on a post to see its content it gives me an error: Object reference not set to an instance of an object.
https://www.masterclima.info/forumx/ 
Can you tell me where is the error? Thank you
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
Is there a reason why you upgraded to such an old BETA version? That issue should not occur in the current release 3.1.14.

You could fix the error if you compile the source of your version. by removing the line...

this.AddMetaData(firstPost.Message);

in the fileyafsrc/YetAnotherForum.NET/Pages/Posts.ascx.cs
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago

Thank you. Unfortunately I don't have the source code and this is some code left by a colleague who is now retired. So I can't compile it and am upgrading from an even older version to this one. If nothing can be done I will try to create a fresh install from scratch.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
But what stop you from upgrading to the latest version.

Did your colleague make any modifications that are not ui based?

Tecnicallly and upgrade should be possible, but make sure to backup the database first.
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago

but the update can be done without source?
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
it gives me many errors due to the framework used, I believe
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
For the upgrade you don't need the source code.

Follow the upgrade guide, and use the web.config migration Tool and you should be able to upgrade.

And if the something goes wrong post the errors here.
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
The error:
Could not load file or assembly 'Newtonsoft.Json, Version=6.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)

www.masterclima.info/forumx 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
Looks like you didnt upgrade the web.config.

You can migrate your web.config here..https://yetanotherforum.net/migrationTool 

Or manually add the entry

<dependentAssembly>
  <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>

to the node /configuration/runtime/assemblyBinding/dependentAssembly/ in the web.config.
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
I had migrated
This is my web.config:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\languages" />
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="ADB9793829DDAE60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Memory" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" culture="neutral" publicKeyToken="CC7B13FFCD2DDD51" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.2" newVersion="7.0.0.2" />
</dependentAssembly>
</assemblyBinding>
I added culture="neutral" which was missing and now from this error:
https://www.masterclima.info/forumx/ 
Quote:

Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message:CS0234: The type or namespace name 'Classes' does not exist in the namespace 'YAF' (are you missing an assembly reference?)

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
you need to paste the whole content of the web.config, otherwise the config will not completely migrated.

PS: No data will be saved on the the server.
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
<configuration>
  <configSections>
    <section name="rewriter" type="YAF.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, YAF.UrlRewriter" requirePermission="false" />
  </configSections>
  <connectionStrings configSource="db.config" />
  <appSettings configSource="app.config" />
  <rewriter configSource="URLRewriter.config" />
  <system.net>
    <mailSettings>
      <smtp configSource="mail.config" />
    </mailSettings>
  </system.net>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.8" />
      </system.Web>
  -->
  <system.web>
    <httpRuntime targetFramework="4.8" />
    <!--<customErrors defaultRedirect="Error.aspx" mode="RemoteOnly"/>-->
    <customErrors mode="Off" />
    <!--  GLOBALIZATION
          This section sets the globalization settings of the application. 
          Utf-8 is not supported on Netscape 4.x 
          If you need Netscape compatibility leave iso-8859-1.
          UTF-8 is recommended for complex languages
    -->
    <globalization culture="it-IT" enableClientBasedCulture="false" fileEncoding="UTF-8" requestEncoding="UTF-8" responseEncoding="UTF-8" uiCulture="it-IT" />
    <!--<globalization culture="en-US" uiCulture="en"  fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1"/>-->
    <!-- COMPILATION
    * Set debug to "true" to test out the system in development 
    * Set optimizeCompilation to "true" for *MUCH* faster application pool
      restarts on larger .NET systems. But, please read and understand the caveats
      before enabling this settings:
      http://blogs.msdn.com/b/davidebb/archive/2009/04/15/a-new-flag-to-optimize-asp-net-compilation-behavior.aspx             
    -->
    <compilation debug="true" targetFramework="4.8" optimizeCompilations="false">
      <assemblies>
        <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
      </assemblies>
    </compilation>
    <httpHandlers>
      <add verb="GET" path="Resource.ashx" type="YAF.Core.Handlers.ResourceHandler, YAF.Core" />
    </httpHandlers>
    <httpModules>
      <add name="UrlRewriter" type="YAF.UrlRewriter.RewriterHttpModule,YAF.UrlRewriter" />
    </httpModules>
    <pages clientIDMode="AutoID">
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI.HtmlControls" assembly="System.Web" />
        <!-- Default: use non-dynamic (compiled classes) in YAF -->
        <add tagPrefix="YAF" namespace="YAF.Web.Controls" assembly="YAF.Web" />
        <add tagPrefix="YAF" namespace="YAF.Classes" />
        <add tagPrefix="YAF" namespace="YAF" />
      </controls>
      <namespaces>
        <add namespace="YAF.Core" />
        <add namespace="YAF.Web.Controls" />
        <add namespace="YAF.Types.Interfaces" />
        <add namespace="YAF.Types" />
      </namespaces>
    </pages>
    <!--  Enable it if your application is hosted in a web farm or cluster (e.g. GoDaddy hosting) or you are using standard ASP.NET providers and encryption. 
          IMPORTANT: DO NOT USE THIS KEY! You need to generate your own machine key via https://yetanotherforum.net/key
    -->
    <!-- <machineKey validationKey="5B169A4270DB7D6A285CF068B81047D1A73A5FDDE9B204254AB86147B061C3C13DB6E84311E98EDFDD7FF50309DB9632A1C573A716CF120535EC3401BF7706D7"
        decryptionKey="910403AE3DEB5DD0AF73911DBB180518144AC983C1C7E7BDEE1CC8B6C74CBEF3"
        validation="HMACSHA256" decryption="AES"/> 
    -->
    <webServices>
      <protocols>
        <add name="HttpGet" />
        <add name="HttpPost" />
      </protocols>
    </webServices>
  </system.web>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="bin;bin\languages" />
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"  />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="ADB9793829DDAE60" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Memory" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
      </dependentAssembly>
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" culture="neutral" publicKeyToken="CC7B13FFCD2DDD51" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.2" newVersion="7.0.0.2" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="UrlRewriter" />
      <add name="UrlRewriter" type="YAF.UrlRewriter.RewriterHttpModule,YAF.UrlRewriter" preCondition="managedHandler" />
    </modules>
    <handlers>
      <add name="YafHandler" preCondition="integratedMode" verb="GET" path="Resource.ashx" type="YAF.Core.Handlers.ResourceHandler, YAF.Core" />
      <add name="YafSitemapHandler" path="Sitemap.xml" verb="*" type="YAF.Core.Handlers.SiteMapHandler, YAF.Core" preCondition="integratedMode" />
      <add name="FileUploader" path="FileUploader.ashx" verb="*" type="YAF.Core.Handlers.FileUploader, YAF.Core" preCondition="integratedMode" />
    </handlers>
    <staticContent>
      <remove fileExtension=".ico" />
      <mimeMap fileExtension=".ico" mimeType="image/x-icon" />
      <remove fileExtension=".ttf" />
      <remove fileExtension=".svg" />
      <remove fileExtension=".woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
      <mimeMap fileExtension=".ttf" mimeType="application/font-sfnt" />
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>
    <caching>
      <profiles>
        <add extension=".png" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".gif" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".jpg" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".js" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".css" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".ico" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".axd" kernelCachePolicy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".svg" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
        <add extension=".woff2" policy="CacheUntilChange" varyByHeaders="Browser" location="Client" />
      </profiles>
    </caching>
  </system.webServer>
</configuration>
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
3 months ago
remove that line...

 <add tagPrefix="YAF" namespace="YAF.Classes" />
rainbow77
  • rainbow77
  • 65.8% (Friendly)
  • YAF Forumling Topic Starter YAF Version: 1.9.301
3 months ago
Now this erro:

ALTER TABLE DROP COLUMN failed because column 'MembershipAppName' does not exist in table 'yaf_Board'.
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button