我目前正在使用 C# 开发一个 WCF 项目。我对整个 .NET 领域都很陌生,因为我通常使用 Java,所以请允许我提出一个简单的问题:
如何让我的应用程序请求使用 Windows 密码的凭据(HTTP 摘要/基本)?我尝试了很多谷歌搜索,但很多信息都具有误导性。
这是我的 web.config 当前的样子:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true">
</standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
</configuration>
我是一名优秀的程序员,十分优秀!