Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7
http://sandrinodimattia.net/fixing-common-issues-when-hosting-a-net-4-0-wcf-service-in-iis-7/
Until today I never had to host a WCF service in IIS… I always prefered using a ServiceHost in a Windows Service. Before getting my service up and running I had to face some issues.
Could not load file or assembly ‘service’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
The problem here is that I’m running a .NET 4.0 service in a .NET 2.0 IIS and AppPool. I had to make the following changes:
- Change the IIS .NET Framework version to v4.0.30319 (click on the machine name in IIS Manager and in the right pane choose Change .NET Framework Version)
- Change the .NET Framework version of the AppPool too v4.0 (via Application Pools) or create a new Application Pool.
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. Detailed Error InformationModule StaticFileModule.
The reason for this issue: the ServiceModel for .NET 4.0 was not installed. Run ServiceModelReg.exe -ia to solve this.
Depending on your machine and the .NET version you are running the file could be in one of the following locations:
- C:\Windows\Microsoft.NET\Framework\v4.0.30319\
- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list
- This means that ASP.NET 4.0 was not installed (correctly). Run aspnet_regiis.exe -i using Visual Studio Command Prompt (2010) or via "C:\Windows\Microsoft.NET\Framework\v4.0.30319".
- I also had to install the WCF Activation feature under .NET Framework 3.5.1 Features
Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7的更多相关文章
- WCF - Hosting WCF Service
After creating a WCF service, the next step is to host it so that the client applications can consum ...
- Learning WCF Chapter1 Hosting a Service in IIS
How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services ov ...
- WCF - Hosting WCF Service 四种托管方式
https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next st ...
- Common Issues Which Cause Roles to Recycle
This section lists some of the common causes of deployment problems, and offers troubleshooting tips ...
- (WCF) WCF Service Hosting.
3 Options. 1. Host inside of an application. 2. Host into Windows service. 3. Host into IIS 参考: http ...
- Hosting WCF Service
之前在博客几个实例DemoWCF服务寄宿到控制到应用程序中,这篇来总结一下,经常使用的几种宿主的方式. 1.Self-Hosting 一个WCF服务可以寄宿在控制台应用程序或者WinForms app ...
- WCF - IIS Hosting
WCF - IIS Hosting Hosting a WCF service in IIS (Internet Information Services) is a step-by-step pro ...
- Unity文档阅读 第三章 依赖注入与Unity
Introduction 简介In previous chapters, you saw some of the reasons to use dependency injection and lea ...
- Deploying an Internet Information Services-Hosted WCF Service
Deploying an Internet Information Services-Hosted WCF Service .NET Framework 4 Other Versions .NET ...
随机推荐
- springMvc中406错误解决,springMvc使用json出现406 (Not Acceptable)
springMvc中406错误解决, springMvc使用json出现406 (Not Acceptable) >>>>>>>>>>> ...
- html 之前学习响应式的笔记
响应式的设计,根据用户设备的不同,用户屏幕大小不同,提供不同的网页设计http://mediaqueri.es/PhoneGap 使用2,如何模拟手机设备chome 浏览器 在32以上设备检测用 de ...
- VS2010无法打开CSS问题
安装了VS2010的SP1补丁后,发现打开css文件时出现下面问题: 一点击css文件就弹出:未能完成操作.未指定的错误.无法正常进入. [解决方法]安装最新Web Standards Update补 ...
- 用于做 Android 屏幕自适应的文章资源
Android Developer : (1) https://developer.android.com/training/multiscreen/index.html (2) https://de ...
- sql sever怎样替换把表中数据。
怎样替换把表中“舞台桁架厂”替换为“舞台桁架厂家” 表数据结构为: id name key addre ...
- jquery 单引号和双引号的区别及使用注意
在js中单引号和双引号都是一样的,平时使用的时候尽量用单引号,只有碰到嵌套的时候才会同时用两种引号,感兴趣的朋友可以了解下: 可以执行的语法:$("ul li a").filter ...
- tar 解压缩
解压 tar –xvf file.tar //解压 tar包 tar -xzvf file.tar.gz //解压tar.gz tar -xjvf file.tar.bz2 //解压 tar.bz ...
- 设置UILabel可变高度(根据文本内容自动适应高度)
@property(nonatomic)UILabel *showLabel; // 计算文本所占高度,计算出来之后设置label的高度 // 第一个参数:字体大小,字体大小/样式影响计算字体的高 ...
- C语言数据输入与输出
1 概论 C语言提供了跨平台的数据输入输出函数scanf()和printf()函数,它们可以按照指定的格式来解析常见的数据类型,例如整数,浮点数,字符和字符串等等.数据输入的来源可以是文件,控制台以及 ...
- [lua]再版jobSchedule与脚本描述范型
首先贴上代码 -- CPM:关键路径法(Critical Path Method) jobSchedule = { todos = { -- todo list ... ["finale&q ...