C# WCf rest安装问题
我使用NETFramework4和IIS6创建了一个WCFREST服务。我在全局asa中使用路由表。 它在我的电脑里工作得很好。当我 在Qa服务不工作时安装它 请求服务时,我收到404 错误 问题是IIS的ISAPI筛选器无法在请求和代码之间映射 为IIS应用程序创建了单独的池。 请给我一些建议 网络配置C# WCf rest安装问题,c#,.net,wcf,C#,.net,Wcf,我使用NETFramework4和IIS6创建了一个WCFREST服务。我在全局asa中使用路由表。 它在我的电脑里工作得很好。当我 在Qa服务不工作时安装它 请求服务时,我收到404 错误 问题是IIS的ISAPI筛选器无法在请求和代码之间映射 为IIS应用程序创建了单独的池。 请给我一些建议 网络配置 <configuration> <system.web> <compilation debug="true" targetFramework="4.0
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<trust level="Full" originUrl="" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
</configuration>
如果要将路由与IIS 6一起使用,则需要对路由进行一些特殊的考虑。穿过它们。如果您还没有处理好这些问题,那么当您尝试使用路由时,将得到404。我没有svc文件。所以我设置了路由表,它不是一个代码问题。它在我的计算机中工作,但在QA中不工作,然后也向我们显示
global.asa
文件!你能告诉我们你正在使用什么URL来访问这个网站(在开发中和在你的服务器上),以及你是在“默认网站”下安装的还是在IIS中安装的别名吗?我已经阅读了这篇文章。选择firts选项,它没有帮助。此外,我没有做任何事情在我的计算机与IIS 6和它的工作。
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private void RegisterRoutes()
{
WebServiceHostFactory factory = new WebServiceHostFactory();
RouteTable.Routes.Add(new ServiceRoute("Data", factory, typeof(DataHandler)));
RouteTable.Routes.Add(new ServiceRoute("UserData", factory, typeof(UserData)));
RouteTable.Routes.Add(new ServiceRoute("SetupData", factory, typeof(SetupData)));
}