PIA - Provider's Type could not be found

Oct 13, 2009 at 8:08 PM

After installing the Oct 12 release of PIA (Portal Integration Accellerator) I was able to follow the video for installation/configuration. Although when accessing the 'Items' page I receive the error:

Any thoughts?


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: The configuration element 'CatalogProviders' is not valid. The error is: Provider's Type could not be found

Source Error:

Line 46:    <add name="sqlProvider" type="SqlCatalogProvider" connectionStringName="SQLConnectionString"/>
Line 47:    <add name="xmlProvider" type="XmlCatalogProvider" schemaFile="Items.xsd" dataFile="Items.xml"/>
Line 48:   </CatalogProviders>
Line 49:   
Line 50:   <NewsProviders>

Source File: C:\PIA\web.config    Line: 48


Oct 15, 2009 at 8:19 PM

I encountered the same issue and seem to have fixed it.

The problem appears to be that the CategoryProvider class is not available in the expected namespace within the WebToLeadPortal.dll file.  To fix this, I opened a copy of the web portal Visual Studio solution (available in the Source Code/CRMWebPortal directory), edited all .cs files under the Application/Catalog folder, and altogether stripped the Fabrikam.Application.Catalog namespace declaration from each file, leaving only the using and class declarations.  Also, in /Items.aspx.cs, I removed the "using Fabrikam.Application.Catalog" line.  I compiled, copied the new bin/WebToLeadPortal.dll into the portal web site's bin directory (C:\PIA\bin in the demonstrated case), and voila.

- Eric

Oct 16, 2009 at 10:08 AM

After installing PIA yesterday, I was having the same problem.

@ etolman:
Can you in anyway provide us with the new (editted) files?


Nov 4, 2009 at 5:03 PM

I have a new dll file that works...send me and e-mail and I'll send you a copy.


Nov 24, 2009 at 12:22 PM

i followd all steps in the video but after creatinghe website there is an error "You are not authorized to view this page" Http Error  403 - forbidden IE  

Pls help!! F1

Jan 8, 2010 at 6:11 AM

I've encountered the same issue, but I just wanted to elaborate on Eric's reply a bit since (to me) it was a little confusing.

The problem

The problem that's causing this error is very simple. The catalog provider is in the Fabrikam.Application.Catalog namespace, where all the other providers are without a namespace. Like the error indicates: the type that's registered is Sql/XmlCatalogProvider. The method being used to validate the settings is Type.GetType, and if you try that method without the namespace it'll obviously fail.

Fix 1

The quickest fix here (with the least impact) would be to add the namespace to the web.config:

  <add name="sqlProvider" type="Fabrikam.Application.Catalog.SqlCatalogProvider" connectionStringName="SQLConnectionString"/>
  <add name="xmlProvider" type="Fabrikam.Application.Catalog.XmlCatalogProvider" schemaFile="Items.xsd" dataFile="Items.xml"/>

Now this should let you get away clean without a recompile.

Fix 2/3

Another fix would be to change the code. Now this is similar to what Eric suggests: you can remove the namespace definition at the top of every CatalogProvider and related classes. This will make the CatalogProvider uniform with the way all the other providers. Another option would be to change all the other providers to actually have a namespace similar to the one in the Catalog provider classes like: Fabrikam.Application.News. Obviously this will also require you to change the web.config as above for all the other providers.

The latter in my opinion is the best/neatest solution and I hope that this will actually be done uniformly in future releases :)