Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.3.0 BETA 2 - Cannot create new forums (azure web app) #464

Closed
perniklas opened this issue Sep 3, 2019 · 16 comments

Comments

@perniklas
Copy link

commented Sep 3, 2019

Hello!

I've downloaded several versions from the master branch, as well as beta 1 and 2. When I deploy to an Azure web app, everything seems to work fine until I try to create a new forum using the admin account. This leads to an InvalidOperationException (below). I've tried modifying web.config to targetframework 4.7.2, left it at 4.6.2, installed with no modifications whatsoever (using recommended azure web.config) and it still gives me this error.

[InvalidOperationException: Nullable object must have a value.] System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +52 System.Nullable1.get_Value() +12862673 YAF.Core.Model.ForumRepositoryExtensions.List(IRepository1 repository, Int32 boardId, Nullable1 forumId) in C:\Users\plon\source\repos\YAFNET\yafsrc\YAF.Core\Model\ForumRepositoryExtensions.cs:482 YAF.Pages.Admin.editforum.SaveClick(Object sender, EventArgs e) +980 YAF.Web.Controls.ThemeButton.OnClick(EventArgs e) in C:\Users\plon\source\repos\YAFNET\yafsrc\YAF.Web\Controls\ThemeButton.cs:669 YAF.Web.Controls.ThemeButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) in C:\Users\plon\source\repos\YAFNET\yafsrc\YAF.Web\Controls\ThemeButton.cs:415 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9884270 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 3, 2019

Also whenever I install on Azure I get a message with "No candidates for a guest were found for the board 1.", but if I copy the DB from a working 2.2 installation it will work (until I try to create new forums).

[SqlException (0x80131904): No candidates for a guest were found for the board 1.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +2555926 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +5959200 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.SqlDataReader.TryConsumeMetaData() +58 System.Data.SqlClient.SqlDataReader.get_MetaData() +89 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +430 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, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1483 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +64 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +240 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +41 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88 YAF.Types.Interfaces.Data.<>c__DisplayClass7_0.<GetDataset>b__0(IDbCommand c) +72 YAF.Core.Data.DbAccessBase.Execute(Func2 execFunc, IDbCommand cmd, IDbTransaction dbTransaction) +185 YAF.Types.Interfaces.Data.IDbAccessExtensions.GetDataset(IDbAccess dbAccess, IDbCommand cmd, IDbTransaction dbTransaction) +139 YAF.Types.Interfaces.Data.IDbAccessExtensions.GetData(IDbAccess dbAccess, IDbCommand cmd, IDbTransaction dbTransaction) +57 YAF.Core.Data.DynamicDbFunction.<InvokeGetData>b__28_0(IDbCommand cmd) +30 YAF.Core.Data.DynamicDbFunction.DbFunctionExecute(DbFunctionType functionType, InvokeMemberBinder binder, IList1 parameters, Func2 executeDb, Object& result) +226 YAF.Core.Data.DynamicDbFunction.InvokeGetData(InvokeMemberBinder binder, Object[] args, Object& result) +87 YAF.Core.Data.TryInvokeMemberProxy.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) +18 CallSite.Target(Closure , CallSite , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , DateTime ) +909 YAF.Core.Model.ActiveAccessRepositoryExtensions.PageLoad(IRepository1 repository, Object sessionID, Object boardId, Object userKey, Object ip, Object location, Object forumPage, Object browser, Object platform, Object categoryID, Object forumID, Object topicID, Object messageID, Object isCrawler, Object isMobileDevice, Object donttrack) +1263

@CliffAgius

This comment has been minimized.

Copy link

commented Sep 5, 2019

Been getting the same issues but I sadly don't have an old DB to drop in place as this is for a new website/forum. I have tried many different ideas and there is a thread on the forum as well.

I notice that Beta3 is now on here but that had a last commit of 5days ago and this fault was logged 2 days ago so not sure if this has been fixed or being worked on.

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 5, 2019

Yeah the issue has persisted through numerous versions the last few weeks. It’s probably an azure related issue but I cannot for the life of me figure out how to fix it. I tried manually inserting boards and users into the DB through SSMS but that didn’t help

@Zero2Cool

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2019

Off topic a little, but you folks use Azure? Isn't that really expensive?

@CliffAgius

This comment has been minimized.

Copy link

commented Sep 5, 2019

@Zero2Cool if you have an MSDN/ActionPack subscription you get free credits, well not free as you pay for the subscription but you get what I mean.

I really wanted to use this project but it looks like while it's being worked on it's been broken sadly.

@Zero2Cool

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2019

Provide as much information as possible and the lead developer will be able to fix this faster for you. Keep in mind though, he is just one person and is essentially the lone developer.

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 6, 2019

Steps to reproduce issue:

  • Finish install wizard on clean DB
  • Get the usual data type error regarding LoadBoardSettings and BoardSettings
  • Wait until it resolves itself (can take 5 minutes, can take several hours).
  • Data type error is replaced with No candidates for a guest was found for the board 1 (above).
w8tcha added a commit that referenced this issue Sep 6, 2019
@w8tcha

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

The issue with creating a board is fixed now!

Can you post the full error message for the Loadboardsettings issue? The last time i checked it did work. But i dont have any money right now to test this on azure right now. i can only test it locally

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 6, 2019

Server Error in '/' Application.

Unable to cast object of type 'YAF.Configuration.YafBoardSettings' to type 'YAF.Core.YafLoadBoardSettings'.

**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.InvalidCastException: Unable to cast object of type 'YAF.Configuration.YafBoardSettings' to type 'YAF.Core.YafLoadBoardSettings'.

**Source Error:**

> [No relevant source lines]

**Source File:** Source File: d:\local\Temporary ASP.NET Files\root\4ebb738e\7a688e7e\App_Web_default.aspx.cdcab7d2.eboqafvx.0.cs Line: 0

**Stack Trace:**

> [InvalidCastException: Unable to cast object of type 'YAF.Configuration.YafBoardSettings' to type 'YAF.Core.YafLoadBoardSettings'.] YAF.Core.HttpApplicationStateBaseExtensions.GetOrSet(HttpApplicationStateBase httpApplicationState, String key, Func1 getValue) +170 YAF.Core.CurrentBoardSettings.get_Instance() +74 YAF.Core.Modules.<>c.<RegisterServices>b__1_3(IComponentContext k) +48 Autofac.<>c__DisplayClass5_01.<Register>b__0(IComponentContext c, IEnumerable1 p) +10 Autofac.Builder.<>c__DisplayClass0_01.<ForDelegate>b__0(IComponentContext c, IEnumerable1 p) +14 Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) +43 Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters, Object& decoratorTarget) +103

[DependencyResolutionException: An exception was thrown while activating λ:YAF.Configuration.YafBoardSettings.] Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters, Object& decoratorTarget) +182 Autofac.Core.Resolving.InstanceLookup.Execute() +165 Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) +175 Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) +69 Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters) +116 Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) +74 Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) +54 YAF.Core.AutoFacServiceLocatorProvider.Get(Type serviceType) +72 YAF.Types.Interfaces.IServiceLocatorExtensions.Get(IServiceLocator serviceLocator) +76 YAF.Types.Interfaces.IServiceLocatorExtensions.Get(IHaveServiceLocator haveLocator) +77 YAF.Core.BaseModules.UnloadSessionForumModule.UnloadSessionModule_Unload(Object sender, EventArgs e) +79 System.Web.UI.Control.OnUnload(EventArgs e) +9904658 YAF.Web.Controls.Forum.OnUnload(EventArgs e) +7 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +247 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +178 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +178 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +178 System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23 System.Web.UI.Page.ProcessRequestCleanup() +57 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.default_aspx.ProcessRequest(HttpContext context) in d:\local\Temporary ASP.NET Files\root\4ebb738e\7a688e7e\App_Web_default.aspx.cdcab7d2.eboqafvx.0.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188 System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +26 System.Web.StepInvoker.Invoke(Action executionStep) +101 System.Web.<>c__DisplayClass4_0.<Invoke>b__0() +22
Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.OnExecuteRequestStep(HttpContextBase context, Action step) +64 System.Web.<>c__DisplayClass284_0.<OnExecuteRequestStep>b__0(Action nextStepAction) +54 System.Web.StepInvoker.Invoke(Action executionStep) +85 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +9979713 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71

note: I removed the ` character from some of the stack trace for formatting

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 6, 2019

I'm also having a lot of trouble publishing the app - I'm getting a lot of errors stating that all kinds of YAF..dlls are missing.

@w8tcha

This comment has been minimized.

Copy link
Member

commented Sep 8, 2019

I published beta.3 but i guess the error still occurs!

I'm also having a lot of trouble publishing the app - I'm getting a lot of errors stating that all kinds of YAF..dlls are missing.

What errrors are you getting? Im not sure if publishing is really working. Maybe that's the problem. I use ftp to upload the files to azure

w8tcha added a commit that referenced this issue Sep 8, 2019
@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 9, 2019

What errrors are you getting?

Build errors relating to missing .dll's - this also happens when I try to build the project without publishing. I've tried setting up references for each project, but no success so far. It might be a problem with my VS?

@w8tcha

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

I updated the build dependency. It should compile now

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 9, 2019

Compilation works and I could successfully publish to Azure and install YAF, but the errors persists. After pressing the last "install" button during the wizard, the installer runs for some time before producing Unable to cast object of type 'YAF.Configuration.YafBoardSettings' to type 'YAF.Core.YafLoadBoardSettings'. (automatically resolves itself with time. When it is resolved I get No candidates for a guest were found for the board 1.. I cannot recall how many attempts I have done, but a handful of them have successfully installed the forum (though with the error reported in the initial post) without throwing the object type error.

@perniklas

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

Update: Tore down the DB and recreated it as a Standard S0 DB instead of the usual Basic DB I use. Installation works fine now - I've not republished the app since yesterday so I don't know if it's time (as with the configuration error) or the DB edition change that fixed it. Forum creation works now!

Thank you so much for your help!

@w8tcha

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

oddly i don't even have that option to select a db type. I updated the Wiki about the Azure installation

@w8tcha w8tcha closed this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.