Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vignesh 3 posts 23 karma points
    Mar 26, 2013 @ 13:32
    Vignesh
    0

    uCommerce API Outside the Web Context - Error on setup the project

     

    I've tried to expose uCommerce API outside the web context. I've created a new solution and follow the recommendations from Enable the uCommerce E-commerce API Outside the Web Context, but using latest binaries and configuration files. All went good until I found this error and I couldn't continue:

    An exception of type 'Castle.MicroKernel.ComponentActivator.ComponentActivatorException' occurred in Castle.Windsor.DLL but was not handled in user code

    Additional
    information: could not instantiate UCommerce.EntitiesV2.Repository`1[[UCommerce.EntitiesV2.Product, UCommerce, Version=3.0.0.12278, Culture=neutral, PublicKeyToken=null]] Source=Castle.Windsor

    This exception occurs in the first line of the sample:

    var productList = Product.All().FirstOrDefault();

    The application is a console application and it has defined all standard uCommerce settings. I have followed the other discussions and made sure the DLLs are all updates, referenced and copied to the Bin folder.

    Below my coding was posted. 

     

    App Config:

     

    <?xml version="1.0"?>

    <configuration>

    <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

      <configSections>

        <sectionGroup name="commerce" type="System.Configuration.ConfigurationSectionGroup">

          <section name="catalogConfiguration" type="UCommerce.Infrastructure.Configuration.CatalogConfigurationSection" />

          <section name="runtimeConfiguration" type="UCommerce.Infrastructure.Configuration.RuntimeConfigurationSection" />

          <section name="securityConfiguration" type="UCommerce.Infrastructure.Configuration.SecurityConfigurationSection" />

          <section name="amazonPaymentMethodService" type="UCommerce.Transactions.Payments.Amazon.Configuration.AmazonPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="authorizedotnetPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.AuthorizedotnetPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="braintreePaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.BraintreePaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="dibsPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.DibsPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="ePayPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.EPayPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="eWayPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.EWayPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="googleCheckoutPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.GoogleCheckoutPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="idealIngPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.IdealIngPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="multiSafepayPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.MultiSafepayPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="ogonePaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.OgonePaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="payerPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.PayerPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="payExPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.PayExPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="payPalPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.PayPalPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="sagePayPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.SagePayPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

          <section name="worldPayPaymentMethodService" type="UCommerce.Transactions.Payments.Configuration.WorldPayPaymentMethodServiceConfigurationSection, UCommerce.Transactions.Payments" requirePermission="false" />

        </sectionGroup>

      </configSections>

      <connectionStrings>

        <add name="ucommerce" connectionString="server=192.168.1.9;database=MyLocalDB;user id=sa;password=kbs" providerName="System.Data.SqlClient" />

      </connectionStrings>

      <commerce>

        <runtimeConfiguration enableCache="true" cacheProvider="NHibernate.Caches.SysCache2.SysCacheProvider, NHibernate.Caches.SysCache2" connectionString="(auto)" />

        <catalogConfiguration defaultCultureCode="en-US" enforceCategoryNameUniquenessWithinCatalogs="true" />

        <securityConfiguration enable="true" />

        <amazonPaymentMethodService configSource="configuration\payments\Amazon.config" />

        <authorizedotnetPaymentMethodService configSource="configuration\payments\Authorizedotnet.config" />

        <braintreePaymentMethodService configSource="configuration\payments\Braintree.config" />

        <dibsPaymentMethodService configSource="configuration\payments\Dibs.config" />

        <ePayPaymentMethodService configSource="configuration\payments\ePay.config" />

        <eWayPaymentMethodService configSource="configuration\payments\eWay.config" />

        <googleCheckoutPaymentMethodService configSource="configuration\payments\GoogleCheckout.config" />

        <idealIngPaymentMethodService configSource="configuration\payments\Ideal-Ing.config" />

        <multiSafepayPaymentMethodService configSource="configuration\payments\MultiSafepay.config" />

        <ogonePaymentMethodService configSource="configuration\payments\Ogone.config" />

        <payerPaymentMethodService configSource="configuration\payments\Payer.config" />

        <payExPaymentMethodService configSource="configuration\payments\PayEx.config" />

        <payPalPaymentMethodService configSource="configuration\payments\PayPal.config" />

        <sagePayPaymentMethodService configSource="configuration\payments\SagePay.config" />

        <worldPayPaymentMethodService configSource="configuration\payments\WorldPay.config" />

      </commerce>

    </configuration>

    This is my bin folder:

     

    My post event

     

     XCOPY "$(ProjectDir)bin\debug\*.*" "$(SolutionDir)Project.Web\bin\*.*" /Y

    My Bug was:

    ComponentActivator: could not instantiate UCommerce.EntitiesV2.Repository`1[[UCommerce.EntitiesV2.Product, UCommerce, Version=3.0.0.12320, Culture=neutral, PublicKeyToken=null]]

     

    Please give some idea.

     

    Thanks

    Vignesh D

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft