我正在尝试制作文件:
.well-known/apple-developer-merchantid-domain-association可通过我的Azure网站访问.我已将此添加到路由配置中:
accessible via my Azure website. I have added this to the route config:
routes.MapRoute( name: "ApplePay-MacOS", url: ".well-known/apple-developer-merchantid-domain-association", defaults: new { controller = "Home", action = "WellKnownApplePay" });这指向发出文件的控制器操作.
Which points to a controller action that gives the file out.
现在,当我在本地IIS和IIS Express上对其进行测试时,一切都可以正常工作,但是当我将其上传到天蓝色时,它只是不接受点".URL中的字符.如果我将其删除,则可以正常工作,并且文件在发布为天蓝色后也将下载.我需要它与圆点配合使用,因为这是我的网站对Apple Pay的要求.
Now everything works when I test it on my local IIS and IIS Express but when I upload it to azure it just isn't accepting the dot "." character in the URL. If I remove it then it works and the file downloads after it has been published to azure. I need it to work with the dot as that is what apple pay requires of my site.
推荐答案我能够使用其他方法解决此问题.我停止尝试为证书编写路由,并根据Peter Hahndorf在这里的答案将web.config添加到目录中: IIS:如何在没有扩展名的情况下提供文件?
I was able to solve this using a different approach. I stopped trying to write routing for the certificate and added a web.config into the directory per Peter Hahndorf's answer here: IIS: How to serve a file without extension?
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <staticContent> <mimeMap fileExtension="." mimeType="text/xml" /> </staticContent> </system.webServer> </configuration>更多推荐
Azure网站.众所周知的路由变得不可访问
发布评论