eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-16T21:31:52Z
I'm having problems updating to YAF 2.3.1. I keep getting the error: Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.

I've done a search here and it seems that the error is a missing yaf.core assemblt but I do have that installed and up to date. Here is my web.config file. Any ideas?

<?xml version="1.0" encoding="utf-8"?>
<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>
<system.web>
<httpRuntime />
<customErrors defaultRedirect="Error.aspx" 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="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
<!--<globalization culture="en-US" uiCulture="en" fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1"/>-->
<authentication mode="Forms">
<forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies" />
</authentication>
<!-- 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/...ompilation-behavior.aspx 
-->
<compilation debug="true" />
<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" />
<add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" />
</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.Configuration" />
<add tagPrefix="YAF" namespace="YAF" />
<add tagPrefix="iad" src="~/sys_controls/skyscraper_ad.ascx" tagName="skyscraper_ad"/>
<add tagPrefix="iad" src="~/sys_controls/masthead_ad.ascx" tagName="masthead_ad"/>
<add tagPrefix="iad" src="~/sys_controls/square_ad.ascx" tagName="square_ad"/>
<add tagPrefix="iad" src="~/sys_controls/create_header.ascx" tagName="create_header"/>
<add tagPrefix="iad" src="~/sys_controls/create_metadata.ascx" tagName="create_metadata"/>
<add tagPrefix="iad" src="~/sys_controls/video_entries.ascx" tagName="video_entries"/>
<add tagPrefix="iad" src="~/sys_controls/redirectUpdates.ascx" tagName="redirectUpdates"/>
<add tagPrefix="iad" src="~/sys_controls/listingHeader.ascx" tagName="listing_header"/>
<add tagPrefix="iad" src="~/sys_controls/title_entries.ascx" tagName="title_entries"/>
<add tagPrefix="iad" src="~/iad_tech_specs/tech_specs.ascx" tagName="tech_specs"/>
<add tagPrefix="iad" src="~/iad_notes/notes.ascx" tagName="notes"/>
<add tagPrefix="iad" src="~/iad_connections/connections.ascx" tagName="connections"/>
</controls>
<namespaces>
<add namespace="YAF" />
<add namespace="YAF.Configuration" />
<add namespace="YAF.Core" />
<add namespace="YAF.Web.Controls" />
<add namespace="YAF.Utils" />
<add namespace="YAF.Types.Interfaces" />
<add namespace="YAF.Types" />
<add namespace="System.Web.Optimization" />
</namespaces>
</pages>
<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
<providers>
<clear />
<!-- YAF's ASP.NET Membership Provider is designed to work a bit better with YAF.NET options, but is by no means required.
But, you will not be able to switch providers after installing your forum. -->
<add name="YafMembershipProvider" applicationName="YetAnotherForum" connectionStringName="yafnet" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider" />
<!-- Uncomment and set as default if you want to use the built-in ASP.NET membership provider. Password Type of "Hashed" requires a machine key. -->
<!-- If you want to install YAF.NET inside Azure you need to use that Provider. -->
<!--<add name="AspNetSqlMembershipProvider" applicationName="YetAnotherForum" connectionStringName="yafnet"
enablePasswordReset="false" enablePasswordRetrieval="true" maxInvalidPasswordAttempts="5"
minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="5" passwordAttemptWindow="15"<
passwordFormat="Hashed" requiresQuestionAndAnswer="false" requiresUniqueEmail="true"
type="System.Web.Security.SqlMembershipProvider" />-->
</providers>
</membership>
<roleManager enabled="true" defaultProvider="YafRoleProvider">
<providers>
<clear />
<!-- YAF's ASP.NET Role Provider is designed to work a bit better with YAF.NET options, but is by no means required.
But, you will not be able to switch providers after installing your forum. -->
<add name="YafRoleProvider" applicationName="YetAnotherForum" connectionStringName="yafnet" type="YAF.Providers.Roles.YafRoleProvider" />
<!-- Uncomment and set as default if you want to use use the built-in ASP.NET role provider. -->
<!--<add name="AspNetSqlRoleProvider" applicationName="YetAnotherForum" connectionStringName="yafnet"
type="System.Web.Security.SqlRoleProvider" />-->
</providers>
</roleManager>
<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Utils.YafUserProfile">
<providers>
<clear />
<!-- YAF's ASP.NET Profile Provider is designed to work a bit better with YAF.NET options, but is by no means required.
But, you will not be able to switch providers after installing your forum. -->
<add name="YafProfileProvider" applicationName="YetAnotherForum" connectionStringName="yafnet" type="YAF.Providers.Profile.YafProfileProvider" />
<!-- Uncomment and set as default if you want to use use the built-in ASP.NET profile provider. -->
<!--<add name="AspNetSqlProfileProvider" applicationName="YetAnotherForum" connectionStringName="yafnet"
type="System.Web.Profile.SqlProfileProvider" />-->
</providers>
</profile>
<!-- 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>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="YafTaskModule" />
<remove name="UrlRewriter" />
<add name="UrlRewriter" type="YAF.UrlRewriter.RewriterHttpModule,YAF.UrlRewriter" preCondition="managedHandler" />
<add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" 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=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<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" />
</profiles>
</caching>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\languages" />
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="EB42632606E9261F" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31BF3856AD364E35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Sponsor
tha_watcha
2020-05-16T22:42:19Z
Change line (in the web.config)

<add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" />


to

  <add name="YafTaskModule" type="YAF.Core.TaskModule, YAF.Core" />

UserPostedImage
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-16T23:38:31Z
Done. Now I get: Could not load file or assembly 'YAF.Types, Version=2.2.3.0, Culture=neutral, PublicKeyToken=8b49dc47f4701f66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-16T23:45:38Z
PS. I checked the properties on the types.dll file and it does show as being 2.3.1.4 but for some reason the system is seeing it as 2.2.3.0.
tha_watcha
2020-05-17T00:05:53Z
Did You download the wrong source package?
UserPostedImage
tha_watcha
2020-05-17T00:28:36Z
Also Check if you deleted all yaf... dlls before upgrade?!
UserPostedImage
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-17T08:14:23Z
No, it was the one linked on the front page and yes, everything was deleted first.
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-17T23:23:36Z
Okay, finally got it to work ... I added a few lines of code to my web.config that got it going:

<dependentAssembly>
<assemblyIdentity name="YAF.Core" publicKeyToken="8b49dc47f4701f66" culture="neutral" />
<bindingRedirect oldVersion="2.3.1.4" newVersion="2.3.1.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="YAF.Web" publicKeyToken="8b49dc47f4701f66" culture="neutral" />
<bindingRedirect oldVersion="2.3.1.4" newVersion="2.3.1.5" />
</dependentAssembly>

Now it seems the only thing that is not working is the Admin and Host dropdown lists. Any ideas?
tha_watcha
2020-05-18T02:34:25Z
Well the binding redirects would be only needed if something oudside yaf is referencing it. So you should update those instead.

Regarding the menus check the browser console. Looks like the bootstrap js was not correctly loaded
UserPostedImage
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-18T18:41:26Z
Actually, I think it may be a problem with the download you provided. Just for giggles, I took the download and uploaded it to a completely new site and when I tried to run it, I got this:

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'YAF.Core, Version=2.3.1.4, Culture=neutral, PublicKeyToken=8b49dc47f4701f66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:


Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="YAF.SampleWebApplication.Global" Language="C#" %>


Source File: /global.asax Line: 1
tha_watcha
2020-05-18T19:18:06Z
Looks like i forgot to recompile the solution. I updated the download package. Re-Download the release or recompile the solution
UserPostedImage
eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-18T19:24:58Z
Completely deleted my test site, reset it, downloaded the new version into my new test site and got this:

Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.
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.TypeLoadException: Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.

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:


[TypeLoadException: Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +71
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +41
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +38
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +67
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +39

[ConfigurationErrorsException: Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +370
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +22
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +41
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +44
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +162
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1120
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +84
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +181
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +228
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314

[HttpException (0x80004005): Could not load type 'YAF.Core.YafTaskModule' from assembly 'YAF.Core'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10080656
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263


eutychus
  •  eutychus
  • 88.4% (Honored)
  • YAF Lover Topic Starter
2020-05-18T22:06:02Z
Okay, solved that problem. You still have the TaskModule listed as YAF TaskModule in your web.config code that comes with the download.
tha_watcha
2020-05-19T06:41:22Z
Originally Posted by: eutychus 

Okay, solved that problem. You still have the TaskModule listed as YAF TaskModule in your web.config code that comes with the download.



Thanks, i updated the download again

UserPostedImage
hadzup
  •  hadzup
  • 51.8% (Neutral)
  • YAF Forumling
2020-06-02T17:34:22Z
Please, can you share the entire web.config?
Users browsing this topic

    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

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved