如何将文件夹路径作为webAPI的URL的一部分发送 [英] how to send folder path as part of URL of webAPI
问题描述
我有一个要求,我需要发送文件夹路径作为webapi服务URL的一部分。假设文件夹路径是D:\ test \ upload,我需要将此路径作为服务URL的一部分发送: http:// hostserver:52000 / Service / ConfigPath /(D:\\\ test )
如何使用javascript对路径进行编码?以及如何在服务端解码?
我尝试使用javascript- encodeURIComponent对路径进行编码并将其作为服务url的一部分发送所以服务网址现在是: http:// hostserver:52000 / Service / ConfigPath / D%3A%5Ctest%5Cupload
当我使用about url时,我得到错误说:
从客户端检测到潜在危险的Request.Path值
有谁能告诉我如何将文件夹路径作为URL的一部分发送?
谢谢。
I have a requirement where i need to send a folder path as part of webapi service URL. Suppose the folder path is D:\test\upload , i need to send this path as part of service URL: http://hostserver:52000/Service/ConfigPath/ ( D:\test\upload )
How to encode the path using javascript? and how to decode at the service side?
I tried using javascript- encodeURIComponent to encode the path and send it as part of service url So the service url now is: http://hostserver:52000/Service/ConfigPath/D%3A%5Ctest%5Cupload
When i use the about url, i get an error saying:
A potentially dangerous Request.Path value was detected from the client
Can anyone let me know how to send the folder path as part of the URL?
Thanks.
推荐答案
这篇关于如何将文件夹路径作为webAPI的URL的一部分发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!