我正在尝试在网站开发中使用 FitBit API,我想从头开始制作一个网站,但我无法这样做。
我已按照此处描述的步骤进行操作,并根据此处描述的想法在 Visual Studio 中创建了一个 VB.NET 网站。我已经下载了 OauthNET-Release 库,将 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.
我的问题是:我应该怎么做才能完成这项工作?先感谢您。