authentication mode="Forms" error - Postet den (1022 Views)
Newbie
kerryww
Innlegg: 13
I'm trying to setup a copy of Version 2.0.0.0 using a copy of my MySQL database from my site at http://www.orientbeachonline.com/

I've taken out a shared hosting account with Hostnameste.com and uploaded a copy of the Snitz Forums Version 2.0.0.0 and unzipped it and connected it to my Database but I can't get passed the following error at http://69.12.85.6/plesk-site-preview/orientbeachforum.com/2/

Line 71: </customErrors>
Line 72: <httpRuntime targetFramework="4.7.2" maxRequestLength="2147483647" executionTimeout="1100" relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="<,>,*,%,:,\,?" />
Line 73: <authentication mode="Forms">
Line 74: <forms loginUrl="~/Account/Login" timeout="2880" slidingExpiration="true" cookieSameSite="Lax" requireSSL="false" />
Line 75: </authentication>

Thanks for any suggestions.
My webconfig file is:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<connectionStrings configSource="connectionstrings.config" />
<log4net configSource="log4net.config" />
<appSettings file="snitz.config">
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="RouteDebugger:Enabled" value="false" />
</appSettings>
<system.net>
<mailSettings>
<smtp configSource="mail.config" />
</mailSettings>
<settings>
<ipv6 enabled="true" />
</settings>
</system.net>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<!--<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>-->
</entityFramework>
<!--<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>-->
<!--
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.7.2" />
</system.Web>
-->
<system.web>
<compilation targetFramework="4.7.2" debug="true">
<assemblies>
<add assembly="System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
<httpCookies sameSite="Strict" requireSSL="false" />
<customErrors mode="RemoteOnly" defaultRedirect="~/Error" redirectMode="ResponseRewrite">
<error statusCode="403" redirect="~/Error/Forbidden" />
<error statusCode="404" redirect="~/Error/NotFound" />
<error statusCode="400" redirect="~/400.aspx" />
<error statusCode="500" redirect="~/500.aspx" />
<!-- <error statusCode="404" redirect="~/Error/NotFound" />-->
</customErrors>
<httpRuntime targetFramework="4.7.2" maxRequestLength="2147483647" executionTimeout="1100" relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="<,>,*,%,:,\,?" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" slidingExpiration="true" cookieSameSite="Lax" requireSSL="false" />
</authentication>
<httpModules>
<add name="OnlineActiveUsers" type="SnitzMembership.OnlineUsersModule" />
<add name="TimingModule" type="WWW.Filters.TimingModule" />
<add name="IPBlackList" type="WWW.Filters.IPBlackList" />
</httpModules>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
<roleManager enabled="true" defaultProvider="SnitzSimpleRoleProvider" cookieRequireSSL="false">
<providers>
<clear />
<add name="SnitzSimpleRoleProvider" type="Snitz.WebMatrix.WebData.SnitzSimpleRoleProvider, SnitzMembership, Culture=neutral" />
</providers>
</roleManager>
<membership defaultProvider="SnitzSimpleMembershipProvider">
<providers>
<clear />
<add name="SnitzSimpleMembershipProvider" type="Snitz.WebMatrix.WebData.SnitzSimpleMembershipProvider, SnitzMembership, Culture=neutral" />
</providers>
</membership>
</system.web>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="/404.html" responseMode="File" />
<remove statusCode="500" />
<error statusCode="500" path="/500.html" responseMode="File" />
</httpErrors>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="OnlineActiveUsers" type="SnitzMembership.OnlineUsersModule" />
<add name="TimingModule" type="WWW.Filters.TimingModule" />
<add name="IPBlackList" type="WWW.Filters.IPBlackList" />
</modules>
<security>
<requestFiltering allowDoubleEscaping="true">
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Mysql.Data" publicKeyToken="c5687fc88969c44d" />
<bindingRedirect oldVersion="1.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</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="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="linq2db" publicKeyToken="f19f8aed7feff67e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.7.1" newVersion="1.0.7.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<location path="favicon.ico">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Content">
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" path="404.html" responseMode="File" />
</httpErrors>
</system.webServer>
</location>
</configuration>

My Snitzconfig file is :
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<add key="LanguageConnectionString" value="SnitzConnectionString" />
<add key="forumTablePrefix" value="FORUM_" />
<add key="memberTablePrefix" value="FORUM_" />
<add key="filterTablePrefix" value="FORUM_" />
<add key="customTablePrefix" value="FORUM_" />
<add key="lowercaseQuery" value="0" />
<add key="strForumDescription" value="Snitz Forums 2000 MVC v2.0.0" />
<add key="strForumUrl" value="https://localhost:3306/" />
<add key="strForumTitle" value="Snitz Forums MVC" />
<add key="strForumImage" value="" />
<add key="strCookiePath" value="/" />
<add key="boolDisablePosting" value="0" />
<add key="boolProhibitNewMembers" value="0" />
<add key="strUniqueId" value="Snitz00" />
<add key="boolAllowSearchAllForums" value="1" />
<add key="boolFullTextSearch" value="0" />
<add key="boolShowAvatar" value="1" />
<add key="UseSSL" value="true" />
<add key="boolRunSetup" value="1" />
<!-- API Related -->
<add key="secretkey" value="SnitzWebApi_2017" />
<add key="issuer" value="self" />
<add key="audience" value="https://reddick.co.uk" />
<add key="strDefaultTheme" value="snitz" />
</appSettings>
 Sortering, for datoer betyr DESC nyeste først  
 Sidestørrelse 
Postet den
Forum Administrator
HuwR
Innlegg: 4666
Most of your issues are because of the way plesk preview is rendering the site, it is truncating some of the page. I pointed a temp domain at your site in plesk and now all working

https://orientbeach.reddick.co.uk/
Postet den
Forum Administrator
HuwR
Innlegg: 4666
managed to take a look, added a fix to web.config, that raised another error, so I checked your connectionstrings.config and the database connections were not defined correctly, fixed those but now get this error

orientbe_test DOES NOT EXIST database could not be initialized. An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct Fixed that issue, I now get the forum is offline message, so it is now loading.
did you run the setup against this DB? if not will need to reset some flags and retry. If you did then you may now be able to access the forum as the 'offline' message is tied to the IP who ran the initial install
Postet den
Forum Administrator
HuwR
Innlegg: 4666
I will take a look later using the details you emailed me
Postet den
Newbie
kerryww
Innlegg: 13
In my never ending attempt to get it to work I've tried anything I can find. What I did was copy some code from somewhere, it didn't work but I forgot to go back to the original. I've now copied back the correct code. Here's my entityFramework, But I'm still getting an error. http://69.12.85.6/plesk-site-preview/orientbeachforum.com/
TIA

Code:
 <entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<!-- <providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers> -->
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>
</entityFramework>
Postet den
Forum Administrator
HuwR
Innlegg: 4666
Where are the capitals coming from in the web.config? it should look like this
Code:

  <entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>
</entityFramework>
Postet den
Newbie
kerryww
Innlegg: 13
I have two pages. The original page at http://orientbeachforum.com/ which we setup back in 2018 using Ver: 1.1.4.0 which is still running. Remember when we set it up on a myasp.net shared hosting account back in 2018.
http://69.12.85.6/plesk-site-preview/orientbeachforum.com/ is ver: 2.0.0.0.0 which I'm trying to setup as an upgrade/backup. I'm setting it up using a https://www.hostnamaste.com/ shared hosting (Plesk) account.

Apologies for the confusion.
Kerry
Postet den
Newbie
kerryww
Innlegg: 13
Thanks again for your help.
I can't really give an answer as to when it happened before or after the setup as I'm not really sure when, or if, the setup has run.
I made the changes to the snitz.config file but now getting this Server Error at http://69.12.85.6/plesk-site-preview/orientbeachforum.com/



Here's my snitz.config file.
Code:
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<add key="LanguageConnectionString" value="SnitzConnectionString" />
<add key="forumTablePrefix" value="FORUM_" />
<add key="memberTablePrefix" value="FORUM_" />
<add key="filterTablePrefix" value="FORUM_" />
<add key="customTablePrefix" value="FORUM_" />
<add key="lowercaseQuery" value="0" />
<add key="strForumDescription" value="Snitz Forums 2000 MVC v2.0.0" />
<add key="strForumUrl" value="http://69.12.85.6/plesk-site-preview/orientbeachforum.com/" />
<add key="strForumTitle" value="Snitz Forums MVC" />
<add key="strForumImage" value="" />
<add key="strCookiePath" value="/" />
<add key="boolDisablePosting" value="0" />
<add key="boolProhibitNewMembers" value="0" />
<add key="strUniqueId" value="Snitz00" />
<add key="boolAllowSearchAllForums" value="1" />
<add key="boolFullTextSearch" value="0" />
<add key="boolShowAvatar" value="1" />
<add key="UseSSL" value="false" />
<add key="boolRunSetup" value="0" />
<!-- API Related -->
<add key="secretkey" value="SnitzWebApi_2017" />
<add key="issuer" value="self" />
<add key="audience" value="https://reddick.co.uk" />
<add key="strDefaultTheme" value="snitz" />
</appSettings>
Postet den
Forum Administrator
HuwR
Innlegg: 4666
Ignore my previous reply, it seems you should be using this url, which works fine http://orientbeachforum.com/
Postet den
Forum Administrator
HuwR
Innlegg: 4666
Was this before or after the setup ran?
Pretty sure I have come across this one before, give me a couple of days and I'll dig through my notes, but a couple of things to try.
In the snitz.config file, check the following
boolRunSetup is now 0

also, set
UseSSL to false
strForumUrl to http://69.12.85.6/plesk-site-preview/orientbeachforum.com/
Postet den
Newbie
kerryww
Innlegg: 13
I checked over the code numerous times and missed the obvious! Thanks Huw.
I'm now getting a redirection error. I checked that my browser accepts cookies and I've tried deleting cookies, as FireFox suggests, but I get the feeling there is something else causing the error.


http://69.12.85.6/plesk-site-preview/orientbeachforum.com/
TIA