Tôi có dịch vụ web sử dụng Xác thực Windows. Dịch vụ Web được lưu trữ trên IIS. Có thể thu hẹp quyền truy cập vào dịch vụ web đó chỉ cho một số người dùng cụ thể không? hiện tại web cấu hình của tôi:Làm cách nào để cấp quyền truy cập vào dịch vụ web WCF được lưu trữ trên IIS chỉ dành cho người dùng cụ thể?
<services>
<service name="LANOS.SplunkSearchService.SplunkSearch">
<endpoint binding="basicHttpBinding" bindingConfiguration="basicHttp"
contract="LANOS.SplunkSearchService.ISplunkSearch" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttp" allowCookies="true" maxBufferSize="20000000"
maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000">
<readerQuotas maxDepth="32" maxStringContentLength="200000000"
maxArrayLength="200000000" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
Bằng cách này, tôi đã cố gắng một giải pháp tương tự như sau, mà tôi tìm thấy trên Internet:
<authentication mode="Windows"/>
<authorization>
<allow roles=".\Developers"/>
<allow users="DOMAIN\ServiceAccount"/>
<deny users="*"/>
</authorization>
Nó không làm việc Tuy nhiên. :(Nó cho phép tất cả người dùng miền đi qua
bạn khuyết tật xác thực ẩn danh và cho phép xác thực Windows cho ứng dụng lưu trữ dịch vụ WCF của bạn trong IIS? –
Có, tôi đã làm điều đó. – neurotix