Mono Support Error trying to use DBResourceManager 

Viewed 62687 time(s), 9 post(s), 7/18/2014 9:38:48 AM - by Zoomicon
7/18/2014 9:44:46 AM
2793 Reputation 345 Total posts

based on

http://www.mono-software.com/blog/post/Mono/121/ASP-NET-localization-settings-in-MonoX/

I changed

  <ResourceProviderModel defaultProvider="ResourceManager">

to

  <ResourceProviderModel defaultProvider="DBResourceManager">

and when trying to run site (stopped site in IIS first just in case) I get error (changed it back it works again):

2014-07-18 12:10:07,021 [41] ERROR MonoX [....IP ADDRESS IS SHOWN HERE...] - Error
</br>System.NullReferenceException: Object reference not set to an instance of an object.
</br>   at ASP.default_aspx.__BuildControlctlSlideShow()
</br>   at ASP.default_aspx.__BuildControl__control5(Control __ctrl)
</br>   at System.Web.UI.WebControls.WebParts.WebPartZone.GetInitialWebParts()
</br>   at System.Web.UI.WebControls.WebParts.WebPartManager.RegisterZone(WebZone zone)
</br>   at MonoSoftware.MonoX.TemplatedWebPartZone.OnInit(EventArgs e)
</br>   at MonoSoftware.MonoX.PortalWebPartZone.OnInit(EventArgs e)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>2014-07-18 12:10:07,037 [41] ERROR MonoX [BaseHttpApplication] - Application Error
</br>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
</br>   at ASP.default_aspx.__BuildControlctlSlideShow()
</br>   at ASP.default_aspx.__BuildControl__control5(Control __ctrl)
</br>   at System.Web.UI.WebControls.WebParts.WebPartZone.GetInitialWebParts()
</br>   at System.Web.UI.WebControls.WebParts.WebPartManager.RegisterZone(WebZone zone)
</br>   at MonoSoftware.MonoX.TemplatedWebPartZone.OnInit(EventArgs e)
</br>   at MonoSoftware.MonoX.PortalWebPartZone.OnInit(EventArgs e)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.HandleError(Exception e)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.ProcessRequest()
</br>   at System.Web.UI.Page.ProcessRequest(HttpContext context)
</br>   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
</br>   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

1
7/18/2014 12:28:38 PM
15993 Reputation 2214 Total posts

We will check the default values of the database provider in order to check what resource is missing. We will get back to you soon.

Regards

2
7/18/2014 2:11:31 PM
1384 Reputation 152 Total posts

Hi,

What version of MonoX are you using?
Does it work with a clean install?

Regards,
Igor

3
7/18/2014 3:40:04 PM
2793 Reputation 345 Total posts

we use MonoX v4.9.40.4845 [12/25/2013], DB v4.7.3842

haven't tried on clean install of that version, but from the error log I guess the issue is with resources of SlideShow webpart missing

4
7/18/2014 4:06:01 PM
2793 Reputation 345 Total posts

the only change I remember we had done on slideshow is:

*changed SlideShow.ascx :

- Replaced <div class="title"><%= this.SliderTitle %></div> to <div class="title">Featured Activities</div>

which I think shouldn't cause this issue
</br>

5
7/28/2014 9:16:35 AM
1384 Reputation 152 Total posts

Sorry for the long delay. The truth is I can't help since you are not using officially released version (I can't seem to find this particular version in the release builds). 
The DBResourceManager is tested for all release versions. For example in current release version 4.9.40.4907 we have

LocalizationSource.sql

INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('304FDF06-046C-4F26-9389-A2C401012311','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Next',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('5AFEE89C-4CC2-4CBF-AA85-A2C401012313','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Prev',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('8E9EBDAA-4EA9-4D38-88C9-A2C401012316','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Title',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO

LocalizationString.sql
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('304FDF06-046C-4F26-9389-A2C401012311',N'Next','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('5AFEE89C-4CC2-4CBF-AA85-A2C401012313',N'Prev','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('8E9EBDAA-4EA9-4D38-88C9-A2C401012316',N'Featured projects','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
Do you have those keys in the database, LocalizationSource table? What does this query return:
select top(10) ls.ResourceKey, l.LanguageName, st.Data from LocalizationSource ls
left join LocalizationString st on ls.Id = st.Id
left join Language l on l.Id = ls.LanguageId
where ls.ResourceKey like 'SlideShow_%'
?

6
8/22/2014 2:56:16 PM
2793 Reputation 345 Total posts

THE FOLLOWING QUERY Doesn't RETURN ANYTHING
</br>
</br>select
top(10) ls.ResourceKey, l.LanguageName, st.Data from LocalizationSource ls

left join LocalizationString st on ls.Id = st.Id

left join Language l on l.Id = ls.LanguageId

where ls.ResourceKey like 'SlideShow_%'
</br>
</br>

7
8/22/2014 3:02:40 PM
2793 Reputation 345 Total posts

also, selected all contents of LocalizationSource and pasted to notepad, then searched for 304FDF06 and didn't find something

should I try to execute the above SQL queries to insert that content in the DB?

8
9/1/2014 8:38:45 AM
1384 Reputation 152 Total posts

Hi,

If you haven't added new translations to the database then you can delete all content from tables: LocalizationBinary, LocalizationSource, LocalizationString (backup first)

then execute scripts from the 4.9.40.4907 package LocalizationBinary.sql, LocalizationSource.sql, LocalizationString.sql

otherwise you need to extract differences manually.

9
This is a demo site for MonoX. Please visit Mono Software for more info.