RESTful服务在IIS防爆preSS / VS2013工作,但没有IIS服务器上 [英] RESTFul service works in IIS Express / VS2013 but not on IIS Server

查看:140
本文介绍了RESTful服务在IIS防爆preSS / VS2013工作,但没有IIS服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我VS 2013开发了一个RESTful Web服务,它在本地工作的罚款IIS防爆preSS。

I developed a RESTFul Web Service in VS 2013 and it works fine locally on IIS Express.

我要发表我转移到另一台电脑,并使用IIS管理器导入我的zip文件作为默认Web站点的一部分的包。

I publish to a package which I transfer to another PC and using IIS Manager I import the zip file as part of the Default Web Site.

在浏览器中加载URL总是导致HTTP错误404(或其他40X错误)了应用程序服务器错误。

Loading the url in a browser always leads to a "Server Error in Application" HTTP error 404 (or other 40x error).

我试过不同的实现方式,一是与SVC文件和一个没有。也设置在web.config中= 4.0的目标框架,默认应用程序池设置到.NET V4.0

I've tried to different implementations, one with svc file and one without. Also setting target framework in web.config = 4.0 and setting the Default Application pool to .Net V4.0

我如何得到我的服务(其运行正常从Visual Studio)在IIS中工作?

How do I get my service (which runs fine from Visual Studio) to work in IIS?

推荐答案

我发现从微软的更新启用IIS 7.5的处理程序来处理其URL不以句点结尾的请求

于是我运行Windows更新来应用许多更新我的W​​indows 7将不安装此更新。虽然看起来没有直接关系的扩展名的URL它的伎俩。

My Windows 7 would not install this update so I ran Windows update to apply many updates. Although none looked directly related to extensionless urls it did the trick.

我使用IIS管理器为进口之前我的应用程序,它工作正常!

I imported my application using IIS Manager as before and it works fine!

这篇关于RESTful服务在IIS防爆preSS / VS2013工作,但没有IIS服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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