1
我想在網站開發中使用FitBit API,我想從頭做一個網站,但我無法這樣做。如何使用FitBit API進行網站開發?
我已經按照here所述的步驟操作,並且基於here中描述的想法在Visual Studio中創建了VB.NET網站。我已經下載了OauthNET釋庫,引用的DLL文件到我的項目,我的web.config看起來像這樣:
<?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>
我試圖建立的網站,但沒有成功,我收到此消息:
Error 11 Unrecognized configuration section oauth.net.components.
我的問題是:我該怎麼做才能做到這一點?先謝謝你。