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

查看:30
本文介绍了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.

我每次都检查以下内容:

I checked the following stuff every time:

  • IIS 已开启
  • ASP.NET 已开启
  • 有一个 svc 文件的处理程序

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

I ran out of ideas...

推荐答案

如果IIS是在.NET Framework和Visual Studio之后安装的,需要注册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天全站免登陆