简体   繁体   English

其余WCF网址路由和Web窗体网址路由问题

[英]Rest WCF url Routing & Web Forms Url Routing problem

I have a Web application where i have added a reference to a RESTful WCF. 我有一个Web应用程序,在其中添加了对RESTful WCF的引用。

I got the WCF url Routing to work in my webapplication by adding Inherits="RestService.Global" to the Web applications Global.asax. 通过将Inherits="RestService.Global"添加到Web应用程序Global.asax,可以在Web应用程序中使用WCF url路由。

<%@ Application Codebehind="Global.asax.cs" Inherits="RestService.Global" Language="C#" %>

But then i tried to create url Routing for the Web application and it does not work with the Inherits="RestService.Global" in the Global.asax. 但是,然后我尝试为Web应用程序创建url路由,它无法与Global.asax中的Inherits="RestService.Global"一起使用。 If i take it away it works fine. 如果我把它拿走,那就可以了。 Is there a correct way to do this. 有没有正确的方法来做到这一点。 Thanks for any answer. 感谢您的任何答复。

Not sure why you're setting the Inherits attribute of the Global.asax for the purpose of enables WCF url Routing. 不知道为什么要出于启用WCF网址路由的目的设置Global.asax的Inherits属性。 Follow this post step by step and your routing for RESTful WCF should be set up just fine. 请按照本文的步骤进行操作,您应该可以很好地设置RESTful WCF的路由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM