Windows Vista下IIS 7发布WCF的设置

Windows Vista下IIS 7发布WCF设置步骤稍微有些繁琐.

1. Control Panel -> Programs and Features -> Turn Windows features on or off -> Internet Information Services:

选中Web Management Tools -> IIS 6 Management Compatibility -> IIS Metabase and IIS 6 configuration compatibility.

World Wide Web Services -> Application Development Features下:

选中.NET Extensibility, ASP.NET, ISAPI Extensions, ISAPI Filters.

选中World Wide Web Services -> Security -> Basic Authentication.

单击OK(上面这些在默认安装IIS 7以后是不会自动安装的).

2. 因为IIS 7默认没有提供对*.svc的扩展映射, 所以需要通过WCF的ServiceModelReg.exe注册.

Run as administrator cmd

“C:WindowsMicrosoft.NETFrameworkv3.0Windows Communication FoundationServiceModelReg.exe -i”

注册成功以后就可以看到IIS 7支持(查看Handler Mappings)

3. 添加IIS_IUSERS和NETWORK SERVICE的访问权限. 选中相应目录添加IIS_IUSERS, 勾选上Read&Execute, List Folder Contents, Write等.

4. Application Pool的Managed Pipeline Mode不要使用Integrated, 改为Classic. 这是我今天最郁闷的地方, 最后就是改了这个Success.

5. 如果WCF是由Silverlight调用, 需要在host添加一个名为ClientAccessPolicy.xml的文件. 用它来设置cross-domain-access的策略. 否则Silverlight应用程序调用失败.具体每个元素含义可以查阅MSDN的Network Security Access Restrictions in Silverlight 2这篇文章.

//ClientAccessPolicy.xml


 
      
        

   
        
  
 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部