- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我编写了一个 .NET Web 服务,该服务将由我无法控制的客户端使用(我的服务器是用 PHP 编写的实时服务器的模拟器)。 Web 服务按预期工作,但客户端无法在调用中添加 .asmx 扩展名或任何与此相关的扩展名。他们基本上使用 http://localhost/soap/MyWebService而 IIS 预计 http://localhost/soap/MyWebService.asmx 。有没有办法让 IIS 响应不带 .asmx 扩展名的请求?
最佳答案
添加通配符映射,它将通过 ASP.NET 路由所有请求:
您还需要进行一些 URL 重写,以允许传入请求 http://localhost/soap/MyWebService
映射到 http://localhost/soap/MyWebService .asmx
.
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
基本上,您可以将类似以下内容添加到您的 Application_BeginRequest
方法中:
string path = Request.Path;
if (path.Contains("/soap/") && !path.EndsWith(".asmx"))
Context.RewritePath(path + ".asmx");
我还没有测试过它(而且它是一个 HACK),但它应该可以帮助您入门。
关于.net - 调用不带 .asmx 扩展名的 IIS Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/609125/
我有这样的数据: Box,Code Green,1221 Green,8391 Red,3709 Red,2911 Blue,9820 Blue,4530 使用 pandas 数据框,我想知道是否可以
我正在尝试使用 pandas 计算数据框中各行的扩展均值。如果计算列,一切似乎都工作正常: >>> t = pd.DataFrame([1,2,3,4,5,np.nan]) >>> t 0
我是一名优秀的程序员,十分优秀!