在Web Api调用中转义字符

时间:2013-02-12 00:27:22

标签: asp.net-web-api

我有这个非常奇怪的问题,因为我无法发布任何带有句号的文字。这是我的ajax电话的网址:

url = 'BIReports/SaveReport/' + reportDescription;

如果reportDescrption中有句号,则不会发布。想法?

1 个答案:

答案 0 :(得分:1)

Phil Haack's blog所述,您可以尝试将relaxedUrlToFileSystemMapping设为true

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

    <!-- ... your other settings ... -->
  </system.web>
</configuration>
相关问题