I've recently started work on a new project using EpiServer which I am totally new to. One of my tasks requires me to write a custom page provider.
I have got the sample page provider working and loaded. I've also ensured that I have a Enterprise Developer licence as the functionality is only available with this licence.
So I've done a skeleton implementation of my page provider and entered the info into the web.config on my test site exactly as the XmlPageProvider sample does thusly:
<pageProvider>
<providers>
<add entryPoint="26" capabilities="Create,Edit,Delete,Move,MultiLanguage"
name="custom" type="MyWebsite.CustomProvider,CustomPageProvider" />
<!-- <add filePath="~/externalPages.xml" entryPoint="26" capabilities="Create,Edit"
name="xml" type="CodeSamples.XmlPageProvider,XmlPageProvider" />-->
</providers>
</pageProvider>
While we're at it what is the entryPoint property referring to? I cannot find a satisfactory explanation for this anywhere. When I hit the page however I see the following.
Error occured 2/2/2009 10:07:26 AM User IP fe80::d0e0:16bf:c536:ad4d%10 User Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618) Url http://ioc-dev-uk5:17003/cms/admin/default.aspx Referer (none)
Exception details: TypeInitializationException: The type initializer for 'EPiServer.DataFactory' threw an exception.
Stack trace:
[TypeInitializationException: The type initializer for 'EPiServer.DataFactory' threw an exception.] at EPiServer.Web.InitializationModule.Initialize(EPiServerSection config, Settings settings, ConnectionStringSettingsCollection connectionStringSettings) at EPiServer.Web.InitializationModule.StaticInitialization() at EPiServer.Web.InitializationModule.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[Inner exception ArgumentException: Cannot create an instance of type MyWebsite.CustomProvider,CustomPageProvider] at EPiServer.Core.PageProviderMap.AddPageProvider(ProviderSettings pageProviderSetting) at EPiServer.Core.PageProviderMap.LoadPageProviders(ProviderSettingsCollection pageProvidersCollection) at EPiServer.Core.PageProviderMap..ctor(ProviderSettingsCollection pageProviders) at EPiServer.DataFactory..cctor()
As you can see this is fairly unhelpful. I've tried getting another licence, resetting IIS, rebooting the box, trying to work out what's going on using reflector to look at the code in the EpiServer DataFactory, all to no avail.
I know it's something really simple but what?! It's been driving me mildly insane for about 2 days now.
Plaese Halp!