System.UriFormatException:无效的URI:无法解析授权/主机

问题描述 投票:0回答:1

Uri uri = new Uri(siteURL);

siteURL="https://abcdev.sharepoint.com/sites/TestDuplicate";处>

我收到例外:

System.UriFormatException:无效的URI:无法解析授权/主机

Uri uri =新的Uri(siteURL);其中siteURL =“ https://abcdev.sharepoint.com/sites/TestDuplicate”;我收到异常:System.UriFormatException:无效的URI:授权机构/主机不能是...

asp.net exception uri
1个回答
0
投票

上面的代码看起来正确。即使在“即时”窗口中的运行时,它也可以正常运行。您确定不对字符串进行任何操作吗?主机的格式不正确时,我也遇到了类似的错误:

© www.soinside.com 2019 - 2024. All rights reserved.