none
win8 server 发布WCF成功后无法浏览 RRS feed

  • 问题

  • 刚开始用win8 server用vs2010写的wcf服务 发布不能成功。找到解决方案,改用VS2012就成功了。
    但发布完后到IIS里不能浏览,发现是起始页是.svc,IIS8 不识别,提示MIME type问题,CMD里执行一段命令后再浏览,错误又变了,变成

    Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    又找到了相关的解决方案,修改Applicationhost,改成
    <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
    重启IIS后问题依旧执行aspnet_regiis.exe /iru也不能成功,因为win8server的framework是4.5的,iisfuture里也装了4.5的framework但还是没用。
    求解决方案

    2013年1月2日 9:58

答案