- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用soap (wcf) 构建服务。我想通过单一密码和用户名使我的端点更加安全。当我尝试添加以下配置时,Windows Azure 抛出以下错误:
错误:此配置节不能在此路径中使用。当该部分被锁定在父级别时,就会发生这种情况。锁定可以是默认设置 (overrideModeDefault="Deny"),也可以通过位置标记使用 overrideMode="Deny"或旧的allowOverride="false"显式设置。
行代码是:在本地测试时我必须在 IIS 中更改此设置,但显然我无法在 Windows Azure 平台上调整它?
我想做的就是使用自己的密码和用户名进行访问。是
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="credsBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata externalMetadataLocation="external metadata location" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WCFServiceWebRole.CustomUserNameValidator, WCFServiceWebRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="ServiceEndpointBehavior">
<schemaValidator validateRequest="True" validateReply="False">
<schemas>
<add location="schemalocation" />
</schemas>
</schemaValidator>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
<extensions>
<behaviorExtensions>
<add name="schemaValidator" type="WCFServiceWebRole.Validation.SchemaValidationBehaviorExtensionElement, WCFServiceWebRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpsBinding_CvServiceInterface" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" receiveTimeout="01:00:00" openTimeout="01:00:00" closeTimeout="01:00:00" sendTimeout="01:00:00">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="WCFServiceWebRole.CvService" behaviorConfiguration="credsBehavior">
<endpoint address="myendpoint" behaviorConfiguration="ServiceEndpointBehavior" binding="basicHttpBinding" bindingConfiguration="BasicHttpsBinding_CvServiceInterface" contract="ICvService" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true" />
<security>
<authentication>
<basicAuthentication enabled="true"/>
</authentication>
</security>
</system.webServer>
</configuration>
<!--<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<basicAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>-->
杰罗恩
最佳答案
默认情况下,基本身份验证在 Windows Azure Web 角色中不可用。
您需要创建 2 个启动脚本:
用于安装基本身份验证的 Powershell 脚本
Import-Module ServerManager
Add-WindowsFeature Web-Basic-Auth
注意:这需要 Windows Server 2008 R2 中包含的 PowerShell 2.0(您需要将 osFamily 设置为 2 才能获取 Windows Server 2008 R2:http://msdn.microsoft.com/en-us/library/windowsazure/ee758710.aspx)
将激活基本身份验证的 Bat 文件
%windir%\system32\inetsrv\appcmd set config /section:basicAuthentication /enabled:true
问题
为什么您甚至需要基本身份验证?如果我错了,请纠正我,但 WCF 中的用户名/密码身份验证应该在没有 IIS 的情况下工作,所以我不明白为什么它需要基本身份验证才能工作。
关于wcf - Windows Azure 基本身份验证在云中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10139828/
据我了解,它是服务器中长时间运行的进程。能否覆盖网络游戏服务器等长时间运行的程序实例? 最佳答案 您可以将辅助角色视为 Windows 服务或 Unix 守护进程。正如您所说,它是一个永久执行的进程(
尝试创建ChirpStack Azure 云中的 Docker-Compose 容器: docker login azure docker context create aci myacicontex
我找到了关于这个主题的优秀教程,但它留下了一些悬而未决的问题 http://www.silverlightshow.net/items/Silverlight-in-the-Azure-cloud-P
我们正在尝试使用 ADF(Azure 数据工厂)管道从 DB2 数据库(可在本地基础设施上使用)查询示例数据。我们在本地基础设施的虚拟机中托管了 ADF SHIR(自托管集成运行时)。 我们已经为 D
我在尝试将我的 intelliJ 项目与 JetStream Xsede 云中的 JDK 关联时遇到问题。当尝试通过 intelliJ 访问该目录时,我可以看到一个锁定的文件夹图标,不允许访问它。 我
我是一名优秀的程序员,十分优秀!