IIS 7无法识别svc文件 [英] IIS 7 not recognizing svc file

查看:158
本文介绍了IIS 7无法识别svc文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在IIS7上使用WCF发布Web服务。

I'm trying to publish a webservice using WCF on IIS7.

我为这个项目创建了一个站点,我也创建了一个应用程序 MSDN建议。我可以在我的浏览器中从创建的文件夹中打开html文件,但是如果我尝试访问我的服务的svc文件,则会收到404.3错误(由于扩展配置而无法提供请求的页面)。我已经读过我应该运行servicemodelreg来为svc文件安装缺少的处理程序。在我做了之后我得到一个错误,说处理程序有一个坏模块。

I've created a Site for this project, and I created an Application too as MSDN suggested. I can open html files in my browser from the created folder, but I get 404.3 error (The page you are requesting cannot be served because of the extension configuration) if I try to access the svc file of my service. I've read that I should run servicemodelreg to install the missing handlers for the svc files. After I did I got an error saying that the handler has a bad module.

我每次检查以下内容:


  • IIS已打开

  • ASP.NET已打开

  • svc有一个处理程序文件

我用完了想法......

I ran out of ideas...

推荐答案

如果在.NET Framework和Visual Studio之后安装了IIS,则会发生这种情况,因此需要注册ASP.Net。如果要首先安装IIS,则不存在此类问题。

It happens if IIS is installed after .NET Framework and Visual Studio, so it is necessary to register ASP.Net. If to install IIS at first, there will be no such problems.

但解决方案很简单:打开 Visual Studio Command Promt 并输入此命令

But the solution is simple: open Visual Studio Command Promt and type this command

aspnet_regiis.exe -i

这是链接以及有关此命令及其参数的更多详细信息。

Here is a link with more detailed information about this command and its parameters.

这篇关于IIS 7无法识别svc文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆