Closed john2014 closed 4 years ago
YAF.Core.UserMembershipHelper is now YAF.Core.UsersRoles.UserMembershipHelper
Yafcontext is now BoardContext
That issue is resolved. Now after upgrading YAF forum in Azure SQL Server, I have multiple issues depending on browser. I ran the install/upgrade script two times in Azure SQL Server.
In Firefox browser, when loading forum I immediately get the message
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
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: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Stack Trace:
[SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction) +2555922 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +5959168 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4169 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +255 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2598 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1483 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +374 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +286 System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +392 System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +86 System.Web.Security.SqlMembershipProvider.GetUser(String username, Boolean userIsOnline) +1064 YAF.Core.UsersRoles.UserMembershipHelper.GetUser(String username, Boolean updateOnlineStatus) +61 YAF.Core.UsersRoles.UserMembershipHelper.GetUser(Boolean updateOnlineStatus) +184 YAF.Core.BoardContext.get_User() +22 YAF.Core.BoardContext.InitUserAndPage() +62 YAF.Core.UserPageBase.get_Page() +128 YAF.Core.UserPageBase.PageValueAsInt(String field) +18 YAF.Core.BasePages.ForumPageBase.OnError(EventArgs e) +306 System.Web.UI.Page.HandleError(Exception e) +84 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6560 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245 System.Web.UI.Page.ProcessRequest() +72 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +22 System.Web.UI.Page.ProcessRequest(HttpContext context) +58 ASP.discuss_default_aspx.ProcessRequest(HttpContext context) in d:\local\Temporary ASP.NET Files\root\d241c3ca\f1348f5e\App_Web_jtzauwhu.3.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71
That issue is resolved. Now after upgrading YAF forum in Azure SQL Server, I have multiple issues depending on browser. I ran the install/upgrade script two times in Azure SQL Server.
Which Membership provider are you using? under azure you cant use the YAF Provider, only the standard AspNetSqlMembershipProvider can be used.
I am using the AspNetSqlMembershipProvider provide under Azure SQL.
Please dont post multple issues in one issue report! create separte issues for issues otherwise its impossbile to follow the issues
Please dont post multple issues in one issue report! create separte issues for issues otherwise its impossbile to follow the issues
Depending on browser, the issue I am seeing changes. Hence I posted two issues for two browsers. These issues occur immediately after upgrading forum.
I think the root cause if this issue
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
How do I go about fixing it? I already ran install script twice.
How do I go about fixing it? I already ran install script twice.
Sorry i cant help you much about this. I cant use azure anymore.
The only possible solution i found was here.. https://stackoverflow.com/questions/36413674/azure-could-not-find-stored-procedure-dbo-aspnet-checkschemaversion
That command can only be run by logging into C: drive of SQL server. Obviusly microsoft does not allow us to run any command on sql server C: drive where the actual system files are located.
Azure provides a free unlimited app service (F1 instance). Here is the link: https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
For AZURE sql service, you can use the basic instance: https://azure.microsoft.com/en-us/pricing/details/sql-database/single/
You can get 12 months of free access to Azure sql database. Select purchase model as DTU (instead of vCore). Price for that is $0.0068/hour or $5/month (if you use it for entire month).
Another option is I can send my login details for azure SQL server to you. Would that work?
I forgot to mention: I can create the missing store procedure in sql server. Could you kindly tell me what code to execute to create stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Looking at the install scripts. the membership scripts for azure are only executed on a new install. Did you install a new version or did you upgrade from a previous version?
That command can only be run by logging into C: drive of SQL server. Obviusly microsoft does not allow us to run any command on sql server C: drive where the actual system files are located.
Azure provides a free unlimited app service (F1 instance). Here is the link: https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
For AZURE sql service, you can use the basic instance: https://azure.microsoft.com/en-us/pricing/details/sql-database/single/
You can get 12 months of free access to Azure sql database. Select purchase model as DTU (instead of vCore). Price for that is $0.0068/hour or $5/month (if you use it for entire month).
Another option is I can send my login details for azure SQL server to you. Would that work?
Sorry but i will never again use this criminal service again. After they stole so many money from me by error
you could try to run the install script manually
IF (NOT EXISTS (SELECT name
FROM sys.objects
WHERE (name = N'aspnet_CheckSchemaVersion')
AND (type = 'P')))
EXEC('CREATE PROCEDURE [dbo].aspnet_CheckSchemaVersion AS RAISERROR(''Empty aspnet_CheckSchemaVersion Procedure!!'', 16, 1) WITH SETERROR')
GO
ALTER PROCEDURE [dbo].aspnet_CheckSchemaVersion
@Feature nvarchar(128),
@CompatibleSchemaVersion nvarchar(128)
AS
BEGIN
IF (EXISTS( SELECT *
FROM dbo.aspnet_SchemaVersions
WHERE Feature = LOWER( @Feature ) AND
CompatibleSchemaVersion = @CompatibleSchemaVersion ))
RETURN 0
RETURN 1
END
GO
Looking at the install scripts. the membership scripts for azure are only executed on a new install. Did you install a new version or did you upgrade from a previous version?
I upgraded from 2.0 to 2.31.6 version.
Looking at the install scripts. the membership scripts for azure are only executed on a new install. Did you install a new version or did you upgrade from a previous version?
I upgraded from 2.0 to 2.31.6 version.
At the moment i can only support new installs on azure. If it is an upgrade from a old version you need to run all the azure provider scripts manually.
Also what is the path where the azure upgrade sql scripts are located? I only find /install/mssql/install/azure/
There is no azure folder under upgrade.
Tha
Also what is the path where the azure upgrade sql scripts are located? I only find /install/mssql/install/azure/
There is no azure folder under upgrade.
Thats correct. because as i wrote above the membership scripts are only installed on a new install
The script you posted seems to currently work. I have created a clean link:
If you view console in chrome/firefox browser, you will see many javascript errors. Please have a look.
Well looks like you compiled yaf in debug mode. in that case the script files from cdn are loaded as http and not as https. Also its loads the unminified version of jquery.ForumExtensions.js (which doesent seem to exist on the server)
Well looks like you compiled yaf in debug mode. in that case the script files from cdn are loaded as http and not as https.
Yeah, I had enabled debug mode in web.config so that I can get the actual server message. I have now turned off debug mode off. But it is still loading cdn files in http mode. I have asked server to manually rewrite http to https (on each request) so that error will go away. Can you do it so that it always loads https (whether in debug mode or not).
Also its loads the unminified version of jquery.ForumExtensions.js (which doesent seem to exist on the server)
That is because unminified version does not exists in the installation files. Hence I do not know where to get unminified version from. I have renamed " jquery.ForumExtensions.min.js" to "jquery.ForumExtensions.js" and uploaded to server. Now 404 error is not there.
But if you click login and enter random username/password and click submit; you will see more errors in browser console.
That is because unminified version does not exists in the installation files. Hence I do not know where to get unminified version from. I have renamed " jquery.ForumExtensions.min.js" to "jquery.ForumExtensions.js" and uploaded to server. Now 404 error is not there.
The unmodified is only needed if you are using debug mode, if you want to use debug mode then download the source files
Looking at the error message it still shows that there is no access to the sp mentioned above. Did you run all sql scripts manually as suggested?
Could you tell me which specific sql scripts to run manually? There are too many sql scripts (in install and upgrade folder; in custom and azure sub folders).
Also what is dp?
Of course only the files from the azure folder as I wrote before.
I ment sp not dp! The stored procedure mentioned above
Manually running the install sl code within azure folder worked. The forum is now opening.
However when I visit link /default.aspx?g=admin_admin, I get a server error
If you send me your email address, I will create a new app service on azure and new sql database on azure and send login details to you. You can do all testing (new installs, upgrades, etc). Once you have completed testing (in 4-5 days), I will then delete those azure resources. Would that work?
Once you post your email address here, github will send me an email with your comment. One minute after posting your email address here, you can then delete that comment. This way your email will also be secure.
Manually running the install sl code within azure folder worked. The forum is now opening.
However when I visit link /default.aspx?g=admin_admin, I get a server error
Which yaf version?
The latest version I downloaded yesterday (2.3.1.6)
Looks like there is an issue, is there an entry in the yaf event log?
In the next update I put an catch handle to prevent this error
There is no entry in the event log for this error. Which makes sense since if there was a try/catch block, it would not display this error message. It would instead log this error in the event log.
Also, I have attached the last 50 error message (since I upgraded the forum to version 2.3.1.6) EventLog.txt
The event log entries clearly show that you are not running the latest version. Or you don't have updated all dlls and or removed the old ones.
Also that you don't have a machine key in the web.config
The event log entries clearly show that you are not running the latest version.
I downloaded the latest version and installed it twice. On first install, it told me there is a newer version. On second install, it said the current and new version are the same.
Or you don't have updated all dlls and or removed the old ones.
I removed the /Bin folder and recreated it from files that I downloaded on github.
Also that you don't have a machine key in the web.config
I do have a machine key. In addition, azure automatically adds it own machine key (even if we have specified it in web.config).
Could you please tell me which eventlogid shows these things missing?
"Source": "ASP.discuss_default_aspx",
"Description": "Exception\r\nSystem.Web.HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that
Yeah, I already found out about the machinekey in the log (easy to search). I am still not sure why it is giving that error message.
Can you tell me where to find the other two error message (older version, dll missing).
YAF.Core.Services.YafSendMailThreaded
first entry for example. That class doesn't exist anymore in yaf 2.31
I am still working on this (including doing a new install). In the meanwhile, I found another bug:
From default.aspx?g=admin_restore, if you click on Delete All button, I get the following error message:
I did verify that Microsoft.Extensions.Primitives exists in /Bin folder. Also there should be a try/catch block.
In the https://github.com/YAFNET/YAFNET/releases, what is the difference between Deploy, Install, Upgrade. When should we download each option?
I am still working on this (including doing a new install). In the meanwhile, I found another bug:
From default.aspx?g=admin_restore, if you click on Delete All button, I get the following error message:
I did verify that Microsoft.Extensions.Primitives exists in /Bin folder. Also there should be a try/catch block.
No thats not a bug, just make sure assembly is set in the web.config under assemblybinding
In web.config, I see the following lines:
<assemblies>
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
</assemblies>
Could you tell me the exact code to add to web.config?
In the https://github.com/YAFNET/YAFNET/releases, what is the difference between Deploy, Install, Upgrade. When should we download each option?
Install is for new installs, upgrade is for upgrades and deploy is only used for the ms one click installer
In web.config, I see the following lines:
<assemblies> <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" /> </assemblies>
Could you tell me the exact code to add to web.config?
Look in the recommend or upgrade config. or in the wiki on how to upgrade!
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;" />
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="ADB9793829DDAE60" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.1.4.0" newVersion="3.1.4.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>
</assemblyBinding>
</runtime>
<system.webServer>
Please open new issue reports for each new issue. Otherwise its impossible to help you
I am trying to upgrade forum from old version to latest version (2.31.x). I have built custom application which used YAF controls to get data and these are giving errors. Here are those details:
Error: The type or namespace name 'UserMembershipHelper' does not exist in the namespace 'YAF.Core' (are you missing an assembly reference?
Error: Same as error in #1 above
Error: The type or namespace name 'YafContext' does not exist in the namespace 'YAF.Core' (are you missing an assembly reference?)
Error: Same as error in #3 above
For these four lines of code, what would the equivalent line of code be? Thank you