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

    1. 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".
    2. I also had to install the WCF Activation feature under .NET Framework 3.5.1 Features
时间: 2024-11-05 19:29:33

Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7的相关文章

Failover clustrinng configration common issues

Windows fail-over clustering is very useful for servers fail over, when configuring this function some common issues we might encounter, I shared the solutions as follows: 1) Cluster quorum setting cannot be successful. Most likely, it is due to acce

WCF - Hosting WCF Service

After creating a WCF service, the next step is to host it so that the client applications can consume it. This is known as WCF service hosting. A WCF service can be hosted by using any of the four ways given below: 在创建wcf服务后,下一个步骤就是托管该服务,确保客户端应用可以使用它

Common Issues Which Cause Roles to Recycle

This section lists some of the common causes of deployment problems, and offers troubleshooting tips to help you resolve the problems. An indication that a problem exists with an application is when the role instance fails to start, or it cycles betw

Macbook pro install Tex and TexEditor and common issues (keep updating)

TexLive versus  Miktex Both of them are based on Tex. (Mactex is wrapper on TexLive distribution of Tex and opens to Mac system, while Miktex is for Windows system.) In recent versions, the differences between MiKTeX and TeX Live have narrowed, Packa

(WCF) WCF Service Hosting.

3 Options. 1. Host inside of an application. 2. Host into Windows service. 3. Host into IIS 参考: http://www.codeproject.com/Articles/38160/WCF-Service-Library-with-Windows-Service-Hosting http://www.tuicool.com/articles/URBfm2

WCF - IIS Hosting

WCF - IIS Hosting Hosting a WCF service in IIS (Internet Information Services) is a step-by-step process. IIS Hosting is illustrated below in detail with the desired coding as well as screenshots to understand the process. 按照如下步骤可以在IIS中托管wcf服务.IIS托管的

WCF 入门(29)

前言 最近工作比较忙,加了会班就不想再写东西了,就想洗洗睡. 但是这个视频真的不能断,不能像过去一样写了几集就停了. 现在公司在做一个MVC框架的项目,话说已经一年没有写MVC了,重新上手的感觉还可以.UI那块还是Bootstrap,话说真应该感激以前公司带的Bootstrap入门,颇有收获. 以前写过用datatables来实现列表数据展示功能的小结文章,现阶段正在准备总结一下平时做管理系统界面时候肯定会用到的比如“新增”,“编辑”,“删除”代码,希望能给新同学一点思路,当然也是关于MVC的.

BizTalk开发小技巧

BizTalk开发小技巧 随笔分类 - Biztalk Biztalk 使用BizTalk实现RosettaNet B2B So Easy 摘要: 使用BizTalk实现RosettaNet B2B So Easy最近完成了一个vmi-hub的B2B项目,使用Rosettanet 2.0的标准与一家品牌商,OEM,供应商实现B2B.一共交换4个报文,4B2,3B2,4B2 POD,4C1,说白了就是收发存这些数据:项目环境BizTalk2009...阅读全文 posted @ 2015-10-2

Common Internet File System

CIFS (Common Internet File System) is a protocol that gained popularity around the year 2000, as vendors worked to establish an Internet Protocol-based file-sharing protocol. The Common Internet File System (CIFS) is the standard way that computer us