Exception on creating a new page

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
11/29/2007 3:24:16 PM
Gravatar
Total Posts 15

Exception on creating a new page

 

Hi, using the svn release after a compile when I try to add a new page it throws an exception on line 448 of IndexHelper.cs... it crashes the vs2005 IIS and I'm not sure why, but it does create the page first.

 

This is where is crashes:

 

foreach (IndexBuilderProvider indexBuilder in IndexBuilderManager.Providers)
{
indexBuilder.RebuildIndex(pageSettings, indexPath);
}

11/29/2007 6:31:08 PM
Gravatar
Total Posts 18439

Re: Exception on creating a new page

Hi,

If you do svnn > Update it should be fixed now.

Thanks,

Joe

11/30/2007 7:57:24 AM
Gravatar
Total Posts 15

Re: Exception on creating a new page

Hi, unfortunately, that fix didn't seem to help:

 

The type initializer for 'mojoPortal.Business.WebHelpers.IndexBuilderManager' threw an exception.

The exception occured on IndexHelper.cs line 433,

if (IndexBuilderManager.Providers == null)

11/30/2007 7:59:55 AM
Gravatar
Total Posts 18439

Re: Exception on creating a new page

Is this while working in VS or a deployed build?

Are there files under webroot/Setup/indexbuilderconfig folder?

Thanks,

Joe

11/30/2007 8:05:02 AM
Gravatar
Total Posts 15

Re: Exception on creating a new page

Hi, this is using the SVN checkout on a VS2005 local IIS process, so not

deployed. And the files in webroot/Setup/indexbuilderconfig are the ones

from the SVN checkout which I did not modify.

 

I worked around this by putting try-catch handling around the index call, but this seems inadequate:

 

try{
  if (IndexBuilderManager.Providers == null)
  {
   log.Info("No IndexBuilderProviders found");
  return false;
  }
} catch { }


string indexPath = pageSettings.IndexPath;

ClearPageIndex(pageSettings);

try{
  foreach (IndexBuilderProvider indexBuilder in IndexBuilderManager.Providers)
  {
    indexBuilder.RebuildIndex(pageSettings, indexPath);
  }
}catch { }

11/30/2007 11:32:49 AM
Gravatar
Total Posts 18439

Re: Exception on creating a new page

I think I have this fixed now. Can you revert your changes and do svn update, build and let me know if you agree its fixed.

Thanks,

Joe

11/30/2007 12:07:02 PM
Gravatar
Total Posts 15

Re: Exception on creating a new page

It seems to work now for creating a new page.

However, the search feature does not work now:

 

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'mojoPortal.Business.WebHelpers.FakeIndexBuilderProvider' from assembly 'mojoPortal.Business.WebHelpers'.

Source Error:

[No relevant source lines]


Source File: Line: 0
 

11/30/2007 1:39:08 PM
Gravatar
Total Posts 18439

Re: Exception on creating a new page

Are you sure you got everything from svn update? That type does exist, did you rebuild the whole solution?

I'm not getting any error. Can you tell me steps to reproduce this?

Thanks,

Joe

11/30/2007 2:19:40 PM
Gravatar
Total Posts 15

Re: Exception on creating a new page

 

Hi, I have the type and I did get everything from SVN.

I think you may need to restart your web server because I noticed that your code caches the configuration. I really have no idea why it wouldn't find that type, FakeIndexBuilderProvider, but I did see IndexBuilderManager.cs line 59 is looking for a different sort of type typeof(IndexBuilderProvider));

I'm unsure what is wrong.

11/30/2007 2:26:20 PM
Gravatar
Total Posts 18439

Re: Exception on creating a new page

ASP.NET does heavily cache all the providers. I am caching the config but the runtime is caching the actual provider collection. Sometimes just rebuilding with VS doesn't clear the cache but if you make a small change in Web.config it should clear it, or restart IIS if all else fails. My guess is yours was still cached without the FakeIndexBuilder provider (which is new). All the specific IndexBuilderProviders inherit from IndexBuilderProvider so the IndexBuilderManager only deals with them as the base class.

Are you still getting this error after restarting IIS?

Thanks,

Joe

11/30/2007 2:40:15 PM
Gravatar
Total Posts 15

Re: Exception on creating a new page

Hi, I had restarted IIS but evidently something else was cached because it started to work once I made a small change to the type file for FakeIndexBuilder - thanks

You must sign in to post in the forums. This thread is closed to new posts.