Reputation: 76601
I am trying to use the FitBit API at website development, I want to make a website from scratch but I'm unable to do so.
I've followed the steps described here and I have created a VB.NET Website in Visual Studio based on the ideas described here. I have downloaded the OauthNET-Release library, referenced the DLLs into my project and my web.config looks like this:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<!--<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>-->
<configuration>
<configSections>
<section name="foo" type="bar"/>
<!-- lines omitted -->
</configSections>
<oauth.net.components>
<!-- Components -->
<components>
<!-- Signing provider for HMAC-SHA1 -->
<component service="OAuth.Net.Common.ISigningProvider, OAuth.Net.Common" lifestyle="thread"/>
<!-- Nonce provider -->
<component service="OAuth.Net.Common.INonceProvider, OAuth.Net.Common"/>
<!-- State store -->
<component service="OAuth.Net.Consumer.IRequestStateStore, OAuth.Net.Consumer"/>
</components>
</oauth.net.components>
<!-- lines omitted -->
</configuration>
I've tried to build the website, but it wasn't successful and I received this message:
Error 11 Unrecognized configuration section oauth.net.components.
My question is: What should I do to make this work? Thank you in advance.
Upvotes: 1
Views: 1271
Reputation: 4299
Have you add the section registration to webconfig's <configSections>
? Like this:
<configSections>
<section name="oauth.net.components" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/>
<!-- other stuff -->
</configSections>
Upvotes: 1