Escape characters in WebApi call

2019-08-29 01:14发布

I have this very weird issue in that I cannot post over any text with a period in it. Here's the url for my ajax call:

url = 'BIReports/SaveReport/' + reportDescription;

If reportDescrption has a period in it, it doesnt post. Ideas?

1条回答
家丑人穷心不美
2楼-- · 2019-08-29 02:02

As described in Phil Haack's blog, you may want to try setting relaxedUrlToFileSystemMapping to true.

<configuration>
  <system.web>
    <httpRuntime relaxedUrlToFileSystemMapping="true"/>

    <!-- ... your other settings ... -->
  </system.web>
</configuration>
查看更多
登录 后发表回答