HTTP访问IIS中.svc文件时,404 [英] HTTP 404 when accessing .svc file in IIS

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

问题描述

我最近创建了一个WCF服务时从Visual Studio 2008测试工作正常,但是当我将项目部署到IIS和我尝试访问IIS中的.svc文件,我得到这个错误:

 在'/'Application.The资源中的服务器错误无法被发现。
 

我一直有在过去40天内,问题。

在IIS管理器中的处理程序映射,我可以看到两个条目.SVC:

  SVC-集成和SVC-ISAPI-2.0
 

解决方案

您需要添加一个映射为SVC扩展到ASP.NET。要做到这一点,最简单的方法是从运行C ServiceModelReg.exe -i :\ WINDOWS \ Microsoft.NET \框架\ 3.0 \ Windows通信基础。您可能还需要启用ASP.NET,如果你还没有这样做。


如果您使用的是Windows Server 2012中,按照下列指示来代替:

I recently created a WCF service that works fine when tested from Visual Studio 2008. but when I deploy the project to IIS and I try to access the .svc file from IIS, I get this error :

"Server Error in '/' Application.The resource cannot be found.  "

I've been having this issue for the past 4 days .

in the Handler Mappings of IIS Manager, I can see two entries for .svc :

svc-Integrated and svc-ISAPI-2.0

解决方案

You need to add a mapping for the SVC extension to ASP.NET. The easiest way to do this is to run ServiceModelReg.exe -i from C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation. You may also need to enable ASP.NET if you haven't already done so.


If you are using Windows Server 2012, follow these instructions instead:

这篇关于HTTP访问IIS中.svc文件时,404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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