configuration - EpiServer CMS 5 R2: Custom Page Provider refuses to load -


I have recently started working on a new project, which I am using for Episource. For one of my work I have to write a custom page provider.

The sample page provider is working and loaded. I also made sure that I have an enterprise developer license because the functionality is available only with this license.

So I have implemented a skeleton of my page provider and entered the information in the web. Config My test site is exactly as a sample XML XML provider:

  & lt; Page provider & gt; & Lt; Providers & gt; & Lt; AddPoint = "26" Add capabilities = "Create, edit, delete, move, multilingual" name = "custom" type = "MyWebsite.CustomProvider, CustomPageProvider" /> & Lt ;! - & lt; FilePath = "~ / externalPages.xml" entryPoint = "26" capabilities = "create, edit" name = "xml" type = "CodeSamples.XmlPageProvider, XmlPageProvider" /> - & gt; & Lt; / Providers & gt; & Lt; / PageProvider & gt;  

When we are on it, then what is the property of the entry port? I can not get a satisfactory explanation anywhere for this when I press the page but I look at the following.

Error 2/2/2009 10:07:26 AM User IP fe80 :: d0e0: 16bf: c536: ad4d% 10 user agent Mozilla / 4.0 (compatible; Msaii 7.0; Windows NT 6.0; SLCC 1; NAT CLR 2.0.50727; NAT CLR 3.5.21022; NAT CLR 3k5k3072 9; NAT CLR 3k0k306l8) URL referrer (none)

exception details: TypeInitializationException: 'EPiServer Type Instructor for DataFactory 'threw an exception.

Stack trace:

[TypeInitializationException: 'initializer type EPiServer EPIServer.Web.InitializationModule.Initialize (EPIServerSection Config, Settings, ConnectionStringSettingsCollection connection StringSettings) on EPIServer.Web DataFactory 'an exception in the EPIServer.Web.InitializationModule.Application_BeginRequest (Object Sender, EventArgs E) at initializationModule.StaticInitialization (). On the system Web. Http application Synchronize Execution Step Tem.Web.HttpApplication.IExecutionStep.Execute () on System.Web.HttpApplication.ExecuteStep (IExecutionStep Phase, Boolean & amp; (Additional exception logic expression: EPIServer.Core.PageProviderMap.AddPageProvider (ProviderSettings pageProviderSetting) on ​​EPiServer.Core .PageProviderMap.LoadPageProviders (ProviderSettingsCollection pageProvidersCollection) can not be an example of [MyWebsite.CustomProvider, CustomPageProvider]. EPiServer.DataFactory..cctor () on EPiServer.Core.PageProviderMap..actor (ProviderSettingsCollection pageProviders)

As you can see it is quite useless. I get another license, reset the IIS Area, I am trying to reboot the box, you use the reflector to see the code in Apisrvr Detafaccr'm trying to work, all to no avail. The

I know that This is something really simple but what?! This is making me go mad for almost 2 days.

PLUS HELP!

I think I'm answering myself.

It was really easy.

Gone with the reflection and found it:

  private void AddPageProvider provider settings Pejpradata settings) {if (Type.GetType (pageProviderSetting.Type) == NULL) { New Logic Options ("Can not Create an Example of Type + + Page Provider Settings.");} PageProviderBase Page Provider = Make itPassword Provider (pageprader sorting); Page Provider Start (page provider settings .name, page provider settings. ); If (This._pageProviders.ContainsKey (UrlSegment.ReplaceIllegalChars (pageProvider.Name))) {new logic expression (string.Format ( "pre-registered name of a page provider with {0}", pageProvider.Name));} This .AddPageProvider (Page Provider, Incorrect);}  

The name of the type requires a full namespace on it, so my web.configure now looks like:

  & Lt; page provider & gt; & lt; providers & gt; addPoint = "26" add capabilities = "create, edit, delete, move, multilingual" name = "custom" type = "MyWebsite.CustomProvider , MyWebsite.CustomProvider.CustomPageProvider "/> & Lt; / Providers & gt; & Lt; / PageProvider & gt;  

And we are all working and working ...

Another example of bad error messaging. It should say that many mistakes will be saved about "Could not detect type".


Comments