【发布时间】:2011-05-11 16:52:10
【问题描述】:
我最近构建了一个 WCF 服务,现在我将它部署到 Windows Server 2008。目前,我们没有打开安全协议。但我们会的。我想让它以任何一种方式工作。在该站点中,我启用了匿名身份验证以及表单身份验证。我这样做的原因是为了防止在 iPad、Android 和 Internet Explorer 上弹出身份验证。所以现在他们只是进入登录屏幕。哦,我确实在 Windows 功能中激活了 WCF。如果您也了解如何准备好这个 https,我也想弄清楚这一点。谢谢!!
当我尝试将 *.svc PATH 粘贴到 URL 中时出现此错误。
System.ServiceModel.ServiceActivationException: 服务 '/WCFServices/Accessioning/QuickDataEntryService.svc' 无法激活,因为 编译时异常
到目前为止,这是我的 web.config 配置。
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<!--<baseAddressPrefixFilters>
<add prefix="http://localhost/" />
</baseAddressPrefixFilters>-->
</serviceHostingEnvironment>
<behaviors>
<endpointBehaviors>
<behavior name="AspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
<!-- Watch this section when adding a new WCF Service! New behaviors will be added; just delete them and use "ServiceBehavior" -->
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceBehavior" name="A.LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService">
<endpoint behaviorConfiguration="AspNetAjaxBehavior" binding="webHttpBinding"
contract="A.LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<!--<service name="A.LIMS.UI.Web.WCFServices.Accessioning.IQuickDataEntryService"
behaviorConfiguration="ServiceBehavior">
<endpoint behaviorConfiguration="AspNetAjaxBehavior"
binding="webHttpBinding"
contract="A.LIMS.UI.Web.WCFServices.Accessioning.IQuickDataEntryService" />
</service>-->
<!-- Watch this section when adding a new WCF Service! Duplicate the "QuickDataEntryService" above for an example, but change the fully qualified name -->
</services>
</system.serviceModel>
【问题讨论】:
-
你能给我们看看 *.svc 文件吗?它是否托管在 IIS 虚拟目录中?您可以在 Visual Studio 中右键单击并执行“在浏览器中显示”吗?
标签: wcf forms authentication anonymous