有谁做过WCF的模块?

Topics: 中文(Chinese)
Oct 10, 2012 at 7:19 AM

我的代码

[ServiceContract]
public interface IMyService : IDependency
{
    string Test();
}


[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class MyService : IMyService
{
     public string Test()
     {
          return "test";
      }
}
        
public IEnumerable<RouteDescriptor> GetRoutes()
{
    return new[] {
               new RouteDescriptor {   Priority = 20,
                                             Route = new ServiceRoute(
                                                 "Services",
                                                 new OrchardServiceHostFactory(),
                                                 typeof(IMyService))

               }
          };
 }

我该怎么去访问?
因为我访问http://localhost:30320/OrchardLocal/Services/MyService.svc没反应