Why doesn't System.Uri recognize query parameter for local file path?

前端 未结 2 1583
感情败类
感情败类 2021-01-11 21:52

I need to add some additional query information to file path as query parameter to parse path later during files processing. I though that System.Uri class can hel

2条回答
  •  旧巷少年郎
    2021-01-11 22:21

    Query string parameters are not valid when requesting a local file.

    When you requests a file using http the file is executed and is therefore able to read and process the querystring. When you request a local file it is not executed and so is unable to make use of the querystring.

    What is the reason you are adding querystring params to a file request? Is there another way of doing it?

提交回复
热议问题