YAFLogo

Posted by: rainbow77 - Friday, 18 August 2023 12:07:33
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: [b]Object reference not set to an instance of an object[/b]. The forum can be found at this address: [b]https://www.masterclima.info/forumx/ [/b] Can you tell me where is the error? Thank you

Posted by: tha_watcha - Friday, 18 August 2023 12:39:04
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... [code=csharp]this.AddMetaData(firstPost.Message);[/code] in the file yafsrc/YetAnotherForum.NET/Pages/Posts.ascx.cs

Posted by: rainbow77 - Friday, 18 August 2023 13:29:40
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.

Posted by: tha_watcha - Friday, 18 August 2023 13:59:34
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.

Posted by: rainbow77 - Friday, 18 August 2023 14:13:38
but the update can be done without source?

Posted by: rainbow77 - Friday, 18 August 2023 14:14:55
it gives me many errors due to the framework used, I believe

Posted by: tha_watcha - Friday, 18 August 2023 14:18:32
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.

Posted by: rainbow77 - Friday, 18 August 2023 14:35:53
The error: [i]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)[/i] [url=http://www.masterclima.info/forumx]www.masterclima.info/forumx[/url]  

Posted by: tha_watcha - Friday, 18 August 2023 14:44:50
Looks like you didnt upgrade the web.config. You can migrate your web.config here.. [url]https://yetanotherforum.net/migrationTool[/url] Or manually add the entry [code=markup]<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>[/code] to the node /configuration/runtime/assemblyBinding/dependentAssembly/ in the web.config.

Posted by: rainbow77 - Friday, 18 August 2023 14:56:42
I had migrated This is my web.config: [code=markup]<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> [/code] I added culture="neutral" which was missing and now from this error: [url]https://www.masterclima.info/forumx/[/url] [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?) [/quote]

Posted by: tha_watcha - Friday, 18 August 2023 15:01:58
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.

Posted by: rainbow77 - Friday, 18 August 2023 15:04:52
I did it.  

Posted by: rainbow77 - Friday, 18 August 2023 15:06:13
[code=markup]<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>[/code]

Posted by: tha_watcha - Friday, 18 August 2023 15:14:44
remove that line... [code=markup] <add tagPrefix="YAF" namespace="YAF.Classes" />[/code]

Posted by: rainbow77 - Friday, 18 August 2023 15:30:59
Now this erro: ALTER TABLE DROP COLUMN failed because column 'MembershipAppName' does not exist in table 'yaf_Board'.  

Posted by: rainbow77 - Friday, 18 August 2023 15:36:21
if I try again: [quote]FILE: install/mssql/upgrade/identity/upgrade.sql ERROR: There is already an object named 'yaf_AspNetUsers' in the database. STATEMENT: CREATE TABLE [dbo].[yaf_AspNetUsers](    [Id]            NVARCHAR (128) NOT NULL,    [UserName]      NVARCHAR (MAX) NULL,    [PasswordHash]  NVARCHAR (MAX) NULL,    [SecurityStamp] NVARCHAR (MAX) NULL,    [EmailConfirmed]       BIT            NOT NULL,    [PhoneNumber]          NVARCHAR (MAX) NULL,    [PhoneNumberConfirmed] BIT            NOT NULL,    [TwoFactorEnabled]     BIT            NOT NULL,    [LockoutEndDateUtc]    DATETIME       NULL,    [LockoutEnabled]       BIT            NOT NULL,    [AccessFailedCount]    INT            NOT NULL,    [ApplicationId]                          UNIQUEIDENTIFIER NOT NULL,    [LegacyPasswordHash]  NVARCHAR (MAX) NULL,    [LoweredUserName]  NVARCHAR (256)   NOT NULL,    [MobileAlias]      NVARCHAR (16)    DEFAULT (NULL) NULL,    [IsAnonymous]      BIT              DEFAULT ((0)) NOT NULL,    [LastActivityDate] DATETIME2         NOT NULL,    [MobilePIN]                              NVARCHAR (16)    NULL,    [Email]                                  NVARCHAR (256)   NULL,    [LoweredEmail]                           NVARCHAR (256)   NULL,    [PasswordQuestion]                       NVARCHAR (256)   NULL,    [PasswordAnswer]                         NVARCHAR (128)   NULL,    [IsApproved]                             BIT              NOT NULL,    [IsLockedOut]                            BIT              NOT NULL,    [CreateDate]                             DATETIME2               NOT NULL,    [LastLoginDate]                          DATETIME2         NOT NULL,    [LastPasswordChangedDate]                DATETIME2         NOT NULL,    [LastLockoutDate]                        DATETIME2         NOT NULL,    [FailedPasswordAttemptCount]             INT              NOT NULL,    [FailedPasswordAttemptWindowStart]       DATETIME2         NOT NULL,    [FailedPasswordAnswerAttemptCount]       INT              NOT NULL,    [FailedPasswordAnswerAttemptWindowStart] DATETIME2         NOT NULL,    [Comment]                                NTEXT            NULL,    [Profile_Birthday] DateTime NULL,    [Profile_Blog] NVARCHAR (255) NULL,    [Profile_Gender] INT NULL,    [Profile_GoogleId] NVARCHAR (255) NULL,    [Profile_Homepage] NVARCHAR (255) NULL,    [Profile_Facebook] NVARCHAR (400) NULL,    [Profile_FacebookId] NVARCHAR (400) NULL,    [Profile_Twitter] NVARCHAR (400) NULL,    [Profile_TwitterId] NVARCHAR (400) NULL,    [Profile_Interests] NVARCHAR (400) NULL,    [Profile_Location] NVARCHAR (255) NULL,    [Profile_Country] NVARCHAR (2) NULL,    [Profile_Region] NVARCHAR (255) NULL,    [Profile_City] NVARCHAR (255) NULL,    [Profile_Occupation] NVARCHAR (400) NULL,    [Profile_RealName] NVARCHAR (255) NULL,    [Profile_Skype] NVARCHAR (255) NULL,    [Profile_XMPP] NVARCHAR (255) NULL    CONSTRAINT [PK_dbo.AspNetUsers] PRIMARY KEY CLUSTERED ([Id] ASC)    /*FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]),*/ ); 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.Exception: FILE: install/mssql/upgrade/identity/upgrade.sql ERROR: There is already an object named 'yaf_AspNetUsers' in the database. STATEMENT: CREATE TABLE [dbo].[yaf_AspNetUsers](    [Id]            NVARCHAR (128) NOT NULL,    [UserName]      NVARCHAR (MAX) NULL,    [PasswordHash]  NVARCHAR (MAX) NULL,    [SecurityStamp] NVARCHAR (MAX) NULL,    [EmailConfirmed]       BIT            NOT NULL,    [PhoneNumber]          NVARCHAR (MAX) NULL,    [PhoneNumberConfirmed] BIT            NOT NULL,    [TwoFactorEnabled]     BIT            NOT NULL,    [LockoutEndDateUtc]    DATETIME       NULL,    [LockoutEnabled]       BIT            NOT NULL,    [AccessFailedCount]    INT            NOT NULL,    [ApplicationId]                          UNIQUEIDENTIFIER NOT NULL,    [LegacyPasswordHash]  NVARCHAR (MAX) NULL,    [LoweredUserName]  NVARCHAR (256)   NOT NULL,    [MobileAlias]      NVARCHAR (16)    DEFAULT (NULL) NULL,    [IsAnonymous]      BIT              DEFAULT ((0)) NOT NULL,    [LastActivityDate] DATETIME2         NOT NULL,    [MobilePIN]                              NVARCHAR (16)    NULL,    [Email]                                  NVARCHAR (256)   NULL,    [LoweredEmail]                           NVARCHAR (256)   NULL,    [PasswordQuestion]                       NVARCHAR (256)   NULL,    [PasswordAnswer]                         NVARCHAR (128)   NULL,    [IsApproved]                             BIT              NOT NULL,    [IsLockedOut]                            BIT              NOT NULL,    [CreateDate]                             DATETIME2               NOT NULL,    [LastLoginDate]                          DATETIME2         NOT NULL,    [LastPasswordChangedDate]                DATETIME2         NOT NULL,    [LastLockoutDate]                        DATETIME2         NOT NULL,    [FailedPasswordAttemptCount]             INT              NOT NULL,    [FailedPasswordAttemptWindowStart]       DATETIME2         NOT NULL,    [FailedPasswordAnswerAttemptCount]       INT              NOT NULL,    [FailedPasswordAnswerAttemptWindowStart] DATETIME2         NOT NULL,    [Comment]                                NTEXT            NULL,    [Profile_Birthday] DateTime NULL,    [Profile_Blog] NVARCHAR (255) NULL,    [Profile_Gender] INT NULL,    [Profile_GoogleId] NVARCHAR (255) NULL,    [Profile_Homepage] NVARCHAR (255) NULL,    [Profile_Facebook] NVARCHAR (400) NULL,    [Profile_FacebookId] NVARCHAR (400) NULL,    [Profile_Twitter] NVARCHAR (400) NULL,    [Profile_TwitterId] NVARCHAR (400) NULL,    [Profile_Interests] NVARCHAR (400) NULL,    [Profile_Location] NVARCHAR (255) NULL,    [Profile_Country] NVARCHAR (2) NULL,    [Profile_Region] NVARCHAR (255) NULL,    [Profile_City] NVARCHAR (255) NULL,    [Profile_Occupation] NVARCHAR (400) NULL,    [Profile_RealName] NVARCHAR (255) NULL,    [Profile_Skype] NVARCHAR (255) NULL,    [Profile_XMPP] NVARCHAR (255) NULL    CONSTRAINT [PK_dbo.AspNetUsers] PRIMARY KEY CLUSTERED ([Id] ASC)    /*FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]),*/ ); 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. Stack Trace: [Exception: FILE: install/mssql/upgrade/identity/upgrade.sql ERROR: There is already an object named 'yaf_AspNetUsers' in the database. STATEMENT: CREATE TABLE [dbo].[yaf_AspNetUsers]( [Id] NVARCHAR (128) NOT NULL, [UserName] NVARCHAR (MAX) NULL, [PasswordHash] NVARCHAR (MAX) NULL, [SecurityStamp] NVARCHAR (MAX) NULL, [EmailConfirmed] BIT NOT NULL, [PhoneNumber] NVARCHAR (MAX) NULL, [PhoneNumberConfirmed] BIT NOT NULL, [TwoFactorEnabled] BIT NOT NULL, [LockoutEndDateUtc] DATETIME NULL, [LockoutEnabled] BIT NOT NULL, [AccessFailedCount] INT NOT NULL, [ApplicationId] UNIQUEIDENTIFIER NOT NULL, [LegacyPasswordHash] NVARCHAR (MAX) NULL, [LoweredUserName] NVARCHAR (256) NOT NULL, [MobileAlias] NVARCHAR (16) DEFAULT (NULL) NULL, [IsAnonymous] BIT DEFAULT ((0)) NOT NULL, [LastActivityDate] DATETIME2 NOT NULL, [MobilePIN] NVARCHAR (16) NULL, [Email] NVARCHAR (256) NULL, [LoweredEmail] NVARCHAR (256) NULL, [PasswordQuestion] NVARCHAR (256) NULL, [PasswordAnswer] NVARCHAR (128) NULL, [IsApproved] BIT NOT NULL, [IsLockedOut] BIT NOT NULL, [CreateDate] DATETIME2 NOT NULL, [LastLoginDate] DATETIME2 NOT NULL, [LastPasswordChangedDate] DATETIME2 NOT NULL, [LastLockoutDate] DATETIME2 NOT NULL, [FailedPasswordAttemptCount] INT NOT NULL, [FailedPasswordAttemptWindowStart] DATETIME2 NOT NULL, [FailedPasswordAnswerAttemptCount] INT NOT NULL, [FailedPasswordAnswerAttemptWindowStart] DATETIME2 NOT NULL, [Comment] NTEXT NULL, [Profile_Birthday] DateTime NULL, [Profile_Blog] NVARCHAR (255) NULL, [Profile_Gender] INT NULL, [Profile_GoogleId] NVARCHAR (255) NULL, [Profile_Homepage] NVARCHAR (255) NULL, [Profile_Facebook] NVARCHAR (400) NULL, [Profile_FacebookId] NVARCHAR (400) NULL, [Profile_Twitter] NVARCHAR (400) NULL, [Profile_TwitterId] NVARCHAR (400) NULL, [Profile_Interests] NVARCHAR (400) NULL, [Profile_Location] NVARCHAR (255) NULL, [Profile_Country] NVARCHAR (2) NULL, [Profile_Region] NVARCHAR (255) NULL, [Profile_City] NVARCHAR (255) NULL, [Profile_Occupation] NVARCHAR (400) NULL, [Profile_RealName] NVARCHAR (255) NULL, [Profile_Skype] NVARCHAR (255) NULL, [Profile_XMPP] NVARCHAR (255) NULL CONSTRAINT [PK_dbo.AspNetUsers] PRIMARY KEY CLUSTERED ([Id] ASC) /*FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId]),*/ );] YAF.Types.Extensions.Data.c__DisplayClass14_0.b__2(String sql) +533 System.Collections.Generic.List`1.ForEach(Action`1 action) +101 YAF.Types.Extensions.Data.IDbAccessExtensions.SystemInitializeExecuteScripts(IDbAccess dbAccess, String script, String scriptFile, Int32 timeOut) +503 YAF.Core.Services.UpgradeService.ExecuteScript(String scriptFile) +150 System.Collections.Generic.List`1.ForEach(Action`1 action) +101 YAF.Core.Services.UpgradeService.Upgrade() +512 YAF.Core.Services.Startup.StartupInitializeDb.RunService() +370 YAF.Core.Services.Startup.BaseStartupService.Run() +37 System.Collections.Generic.List`1.ForEach(Action`1 action) +101 YAF.Core.Extensions.IHaveServiceLocatorExtensions.RunStartupServices(IHaveServiceLocator serviceLocator) +480 YAF.Core.Context.YafHttpApplication.Session_Start(Object sender, EventArgs e) +18 System.Web.SessionState.SessionStateModule.CompleteAcquireState() +375 System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1257 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +703 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158[/quote]

Posted by: tha_watcha - Friday, 18 August 2023 15:44:09
[quote=rainbow77;73779]Now this erro: ALTER TABLE DROP COLUMN failed because column 'MembershipAppName' does not exist in table 'yaf_Board'.  [/quote] Thats odd that should not happen... [quote]if I try again:[/quote] try to remove the create table script remove the lines... [code=sql]CREATE TABLE [{databaseOwner}].[{objectQualifier}AspNetUsers](     [Id]            NVARCHAR (128) NOT NULL,     [UserName]      NVARCHAR (MAX) NULL,     [PasswordHash]  NVARCHAR (MAX) NULL,     [SecurityStamp] NVARCHAR (MAX) NULL,     [EmailConfirmed]       BIT            NOT NULL,     [PhoneNumber]          NVARCHAR (MAX) NULL,     [PhoneNumberConfirmed] BIT            NOT NULL,     [TwoFactorEnabled]     BIT            NOT NULL,     [LockoutEndDateUtc]    DATETIME       NULL,     [LockoutEnabled]       BIT            NOT NULL,     [AccessFailedCount]    INT            NOT NULL,     [ApplicationId]                          UNIQUEIDENTIFIER NOT NULL,     [LegacyPasswordHash]  NVARCHAR (MAX) NULL,     [LoweredUserName]  NVARCHAR (256)   NOT NULL,     [MobileAlias]      NVARCHAR (16)    DEFAULT (NULL) NULL,     [IsAnonymous]      BIT              DEFAULT ((0)) NOT NULL,     [LastActivityDate] DATETIME2         NOT NULL,     [MobilePIN]                              NVARCHAR (16)    NULL,     [Email]                                  NVARCHAR (256)   NULL,     [LoweredEmail]                           NVARCHAR (256)   NULL,     [PasswordQuestion]                       NVARCHAR (256)   NULL,     [PasswordAnswer]                         NVARCHAR (128)   NULL,     [IsApproved]                             BIT              NOT NULL,     [IsLockedOut]                            BIT              NOT NULL,     [CreateDate]                             DATETIME2               NOT NULL,     [LastLoginDate]                          DATETIME2         NOT NULL,     [LastPasswordChangedDate]                DATETIME2         NOT NULL,     [LastLockoutDate]                        DATETIME2         NOT NULL,     [FailedPasswordAttemptCount]             INT              NOT NULL,     [FailedPasswordAttemptWindowStart]       DATETIME2         NOT NULL,     [FailedPasswordAnswerAttemptCount]       INT              NOT NULL,     [FailedPasswordAnswerAttemptWindowStart] DATETIME2         NOT NULL,     [Comment]                                NTEXT            NULL,     [Profile_Birthday] DateTime NULL,     [Profile_Blog] NVARCHAR (255) NULL,     [Profile_Gender] INT NULL,     [Profile_GoogleId] NVARCHAR (255) NULL,     [Profile_Homepage] NVARCHAR (255) NULL,     [Profile_Facebook] NVARCHAR (400) NULL,     [Profile_FacebookId] NVARCHAR (400) NULL,     [Profile_Twitter] NVARCHAR (400) NULL,     [Profile_TwitterId] NVARCHAR (400) NULL,     [Profile_Interests] NVARCHAR (400) NULL,     [Profile_Location] NVARCHAR (255) NULL,     [Profile_Country] NVARCHAR (2) NULL,     [Profile_Region] NVARCHAR (255) NULL,     [Profile_City] NVARCHAR (255) NULL,     [Profile_Occupation] NVARCHAR (400) NULL,     [Profile_RealName] NVARCHAR (255) NULL,     [Profile_Skype] NVARCHAR (255) NULL,     [Profile_XMPP] NVARCHAR (255) NULL     CONSTRAINT [PK_{databaseOwner}.AspNetUsers] PRIMARY KEY CLUSTERED ([Id] ASC)     /*FOREIGN KEY ([ApplicationId]) REFERENCES [{databaseOwner}].[aspnet_Applications] ([ApplicationId]),*/ ); GO[/code] from the file install/mssql/upgrade/identity/upgrade.sql  

Posted by: rainbow77 - Friday, 18 August 2023 15:46:49
Now: [quote]FILE: install/mssql/upgrade/identity/upgrade.sql ERROR: There is already an object named 'yaf_AspNetRoles' in the database. STATEMENT: CREATE TABLE [dbo].[yaf_AspNetRoles](  [Id] [nvarchar](128) NOT NULL,  [Name] [nvarchar](256) NOT NULL, CONSTRAINT [PK_AspNetRoles] PRIMARY KEY CLUSTERED (  [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) )[/quote] can i delete this too?

Posted by: rainbow77 - Friday, 18 August 2023 15:56:08
I removed the lines where the "Create" error gave me and now it gives me this: [quote]FILE: install/mssql/upgrade/identity/upgrade.sql ERROR: Violation of PRIMARY KEY constraint 'PK_AspNetRoles'. Cannot insert duplicate key in object 'dbo.yaf_AspNetRoles'. The duplicate key value is (05904DA8-3C2E-42BC-88CB-50E7DB9B62F4). The statement has been terminated. STATEMENT: INSERT INTO [dbo].[yaf_AspNetRoles](Id,Name) SELECT RoleId,RoleName FROM [dbo].[yaf_prov_Role][/quote]

Posted by: tha_watcha - Friday, 18 August 2023 16:02:57
i think you can remove the entire content of the upgrade.sql file.

Posted by: rainbow77 - Friday, 18 August 2023 16:03:42
and after removing other insert and create rows this is the error: [quote]Invalid column name 'DarkMode'. 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.Data.SqlClient.SqlException: Invalid column name 'DarkMode'. [/quote]

Posted by: rainbow77 - Friday, 18 August 2023 16:09:13
I do. the error is column Darkmode

Posted by: tha_watcha - Friday, 18 August 2023 16:21:16
Thats seems to be a bug. I updated the release [url]https://github.com/YAFNET/YAFNET/releases/download/v3.1.14/YAF.SqlServer-v3.1.14-Upgrade.zip[/url] Download the upgrade package and then replace only the dlls from the bin folder.

Posted by: rainbow77 - Friday, 18 August 2023 16:24:33
Works!!!!!!!🤩 Thank you

Posted by: tha_watcha - Friday, 18 August 2023 16:32:25
On more change disable debug mode, otherwise the javascripts dont work change the line in the web.config from... [code=markup]<compilation debug="true" targetFramework="4.8" optimizeCompilations="false">[/code] to [code=markup]<compilation debug="false" targetFramework="4.8" optimizeCompilations="false">[/code]  

Posted by: rainbow77 - Monday, 21 August 2023 12:03:04
Everything seems to work now. The only thing is the look and colors. They are different than the test forum or even this forum. Depends on what?

Posted by: tha_watcha - Monday, 21 August 2023 12:57:19
It depends on which theme you are using. As far as I can see you use the standard yaf theme, the same as the test forum.

Posted by: rainbow77 - Monday, 21 August 2023 13:40:40
Yes, so I must have some css that interferes with the forum one. I'm trying to figure out where I can fix

Posted by: tha_watcha - Monday, 21 August 2023 13:51:50
[quote=rainbow77;73792]Yes, so I must have some css that interferes with the forum one. I'm trying to figure out where I can fix[/quote] Can you point to the differences? your forum and the test forum are completely identical. I don't see any differences.

Posted by: rainbow77 - Monday, 21 August 2023 14:09:01
[img]https://www.masterclima.info/files/forum.png[/img] the fonts are black and the page goes from left to right instead of being centered

Posted by: tha_watcha - Monday, 21 August 2023 14:26:24
in chrome it looks correct... [attach]2331[/attach] Which browser are u using?

Posted by: rainbow77 - Monday, 21 August 2023 14:29:48
Now works. I don't know what has changed 😯

Posted by: rainbow77 - Tuesday, 22 August 2023 11:48:45
Search doesn't work

Posted by: tha_watcha - Tuesday, 22 August 2023 13:05:58
Can you be more specific? Was the search index created? (does the folder search_index in the App_Data contains any files?)  Did you try to create the index manually via the host settings > search?

Posted by: rainbow77 - Tuesday, 22 August 2023 15:18:56
I don't think I know how to do it. In the indicated folder there are 2 files: segments.gen and segments, both of 1 KB How do I create the index?

Posted by: tha_watcha - Tuesday, 22 August 2023 15:54:42
Normally the (re)index runs every 24 hours, but you can manually trigger the re-index of the search database via Host > Host Settings > Search > Re-Index Search. And if under Host > Host Settings > Logs > Allow log Application Info is enabled you can see in the yaf event log if the search database was updated or if there was an error.

Posted by: rainbow77 - Tuesday, 22 August 2023 15:58:58
There is an error [img]www.masterclima.info/files/search.png[/img]

Posted by: tha_watcha - Tuesday, 22 August 2023 16:13:18
Looks like there is no write Access to the App_Data folder the identity needs to have write access (Check the user identity running the IIS app (usually NETWORK SERVICE) and ensure that user has the proper rights to the App_Data folder.)

Posted by: rainbow77 - Tuesday, 22 August 2023 16:49:32
Thank you. Now works!

Posted by: rainbow77 - Wednesday, 23 August 2023 10:26:34
Doesn't show closed forum icon: [img]www.masterclima.info/files/chiuso.png[/img]

Posted by: tha_watcha - Wednesday, 23 August 2023 12:51:59
i can confirm the issue. Will be fixed in the next release YAF 3.1.15