c# - Unable to load 'paypal' section from your config -
i'm experiencing problem paypal sdk .net. i've filled out settings in web.config, when try use paypal sdk's configmanager fetch these settings, comes following error:
unable load 'paypal' section *.config: error occurred creating configuration section handler paypal: exception has been thrown target of invocation.
i hoping might have experienced issue before, or otherwise knows how me.
i've tried loading web.config settings manually using configurationmanager.getsection("paypal") no luck.
thanks in advance, hope can me!
my web.config:
<?xml version="1.0" encoding="utf-8"?> <!-- more information on how configure asp.net application, please visit http://go.microsoft.com/fwlink/?linkid=301880 --> <configuration> <configsections> <section name="paypal" type="paypal.sdkconfighandler, paypal" /> <section name="log4net" type="log4net.config.log4netconfigurationsectionhandler, log4net" /> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> </configsections> <paypal> <settings> <add name="mode" value="sandbox"/> <add name="connectiontimeout" value="360000"/> <add name="requestretries" value="1"/> <add name="clientid" value="censored"/> <add name="clientsecret" value="censored" /> </settings> </paypal> <log4net> <appender name="fileappender" type="log4net.appender.fileappender"> <file value="myproject.log" /> <appendtofile value="true" /> <layout type="log4net.layout.patternlayout"> <conversionpattern value="%date [%thread] %-5level %logger [%property{ndc}] %message%newline"/> </layout> </appender> <root> <level value="debug" /> <appender-ref ref="fileappender" /> </root> </log4net> <appsettings> <add key="paypallogger" value="paypal.log.log4netlogger" /> <add key="webpages:version" value="3.0.0.0" /> <add key="webpages:enabled" value="false" /> <add key="clientvalidationenabled" value="true" /> <add key="unobtrusivejavascriptenabled" value="true" /> <add key="noreplypassword" value="hsg3coj53u" /> <add key="systemmailpassword" value="f3clq4geb5" /> </appsettings> <system.web> <trust level="full" /> <compilation targetframework="4.5" debug="true" /> <httpruntime targetframework="4.5" /> <sessionstate mode="inproc" timeout="120" /> <customerrors mode="off" /> </system.web> <system.webserver> <rewrite> <rules> <rule name="autodiscover xml php" patternsyntax="wildcard" stopprocessing="true"> <match url="*autodiscover.xml" /> <action type="rewrite" url="{r:1}autodiscover.php" /> </rule> </rules> </rewrite> </system.webserver> <runtime> <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentassembly> <assemblyidentity name="microsoft.owin" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="microsoft.owin.security.oauth" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="microsoft.owin.security.cookies" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="microsoft.owin.security" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="newtonsoft.json" culture="neutral" publickeytoken="30ad4fe6b2a6aeed" /> <bindingredirect oldversion="0.0.0.0-6.0.0.0" newversion="6.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="system.web.optimization" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-1.1.0.0" newversion="1.1.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="webgrease" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="0.0.0.0-1.6.5135.21930" newversion="1.6.5135.21930" /> </dependentassembly> <dependentassembly> <assemblyidentity name="antlr3.runtime" publickeytoken="eb42632606e9261f" culture="neutral" /> <bindingredirect oldversion="0.0.0.0-3.5.0.2" newversion="3.5.0.2" /> </dependentassembly> <dependentassembly> <assemblyidentity name="system.web.helpers" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="system.web.webpages" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="system.web.mvc" publickeytoken="31bf3856ad364e35" /> <bindingredirect oldversion="1.0.0.0-5.2.3.0" newversion="5.2.3.0" /> </dependentassembly> <dependentassembly> <assemblyidentity name="mysql.data" publickeytoken="c5687fc88969c44d" culture="neutral" /> <bindingredirect oldversion="0.0.0.0-6.9.6.0" newversion="6.9.6.0" /> </dependentassembly> </assemblybinding> </runtime> <connectionstrings> <add name="entities" providername="mysql.data.mysqlclient" connectionstring="server=myproject.com; port=3306;database=myproject;uid=myproject;password=censored;" /> </connectionstrings> <entityframework codeconfigurationtype="mysql.data.entity.mysqlefconfiguration, mysql.data.entity.ef6"> <defaultconnectionfactory type="system.data.entity.infrastructure.sqlconnectionfactory, entityframework" /> <providers> <provider invariantname="mysql.data.mysqlclient" type="mysql.data.mysqlclient.mysqlproviderservices, mysql.data.entity.ef6" /> <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserver.sqlproviderservices, entityframework.sqlserver" /> </providers> </entityframework> <system.data> <dbproviderfactories> <remove invariant="mysql.data.mysqlclient" /> <add name="mysql data provider" invariant="mysql.data.mysqlclient" description=".net framework data provider mysql" type="mysql.data.mysqlclient.mysqlclientfactory, mysql.data, version=6.9.6.0, culture=neutral, publickeytoken=c5687fc88969c44d" /> </dbproviderfactories> </system.data> </configuration>
uninstalling .net framework 4.6 rc suggested jason z, fixed issue.
i'm sure in newer releases of paypal sdk it'll work .net 4.6, doesn't, unfortunately.
it seems work when installing paypal sdk 1.4.2 instead of 1.4.3.
Comments
Post a Comment