如何在IIS中部署.Net 2.0 Rest Web服务 [英] How to deploy a .Net 2.0 Rest Webservice in IIS

查看:140
本文介绍了如何在IIS中部署.Net 2.0 Rest Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.我按照文章

<a href="http://www.codeproject.com/KB/webservices/REST_Web_Service.aspx">.NET 2.0 REST Service</a>[<a href="http://www.codeproject.com/KB/webservices/REST_Web_Service.aspx" target="_blank" title="New Window">^</a>]


2.当我尝试使用引用本地主机上ASP.NEt调试器服务器的URL来访问服务时,它可以正常工作.

3.现在是时候在IIS服务器上发布了,就像我对普通网站所做的一样.

4.但是,当我尝试使用引用IIS服务器的URL进行访问时,它不会返回结果,而是说页面不存在.

请注意,我仔细阅读了文章下方提供的评论/建议.


2. When i try to access the service using the URL referring to ASP.NEt debugger server on local host, it works perfectly all right.

3. Now its time for me to publish on the IIS server and i did so just like how we do for normal websites.

4. However when i try to access using the url referring to the IIS server, it doesnt return the result, rather it says page doesnt exist.

Please note that i went though the comments/suggestions provided below the article.

推荐答案

由于该文章使用了自定义处理程序,因此您可能需要映射这些处理程序.因为IIS或ASP.Net进程可能无法理解此类文件扩展名请求.

通过此链接 http://support.microsoft.com/kb/308001 [
As that article uses custom handlers you may need to map those handlers. Because IIS or ASP.Net processes may not understand such file extension requests.

Go through this link http://support.microsoft.com/kb/308001[^]

Refer to deploy the handler section. Note this method differ for different versions of IIS.If you using windows 7 the IIS manager has a icon link for handler mappings.

Rest of the things are similar as Sandeep Mewara said


1相似.为现有网站添加新的虚拟文件夹或添加新网站,并将其绑定到项目中的webservice物理文件夹/RESTService.
2.将此站点/文件夹绑定到新的或现有的应用程序池(确保将池配置为支持适当的ASP.NET版本,在这种情况下为2.0)
3.将Chenge服务器形式的Default(即开发服务器)从具有适当URL的自定义服务器转变为自定义服务器. 4.检查硬编码URL的代码,其中某些可能需要适当更改.

我从您提到的链接(评论和讨论"部分)获得了上述信息.您是否读过这些评论?


我希望以上信息对您有所帮助.如果您还有其他疑问,请告诉我.
1. Add new virtual folder for existing website or add new website, binded to webservice phisical folder /RESTService in project.
2. Bind this site/folder to new or existing Application Pool (make sure, pool configured to support appropriate ASP.NET version, 2.0 in this case)
3. Chenge server form Default (which is Development server) to custom server with appropriate URL.
4. Check code for hardcoded URLs, some of them may have to be changed appropriatelly.

I got the above information from your mentioned link(Comments and Discussions part).Did yo read those comments?


I hope the above information will be helpful. If you have more concerns, please let me know.


尽管您说您关注了这篇文章,但似乎错过了底部文章论坛中的第一个主题.它讨论了确切的内容: http://www.codeproject.com/Messages/2869485/Re-How-to-implement-this-service.aspx [在IIS 7.0上部署ASP.NET网站 [在IIS上部署网站 [
Though you say you followed the article, looks like you missed the first thread in the article forum at the bottom. It discusses the exact thing: http://www.codeproject.com/Messages/2869485/Re-How-to-implement-this-service.aspx[^]

Further, hosting a website or a webservice is similar thing. For hosting the Webservice/website:

1. In IIS7: Deploying ASP.NET Websites on IIS 7.0 [^]
2. In IIS6: Deployment of a Website on IIS[^]


这篇关于如何在IIS中部署.Net 2.0 Rest Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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