Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

UriFormatException was unhandled

$
0
0

I have a class named HttpRequestHelper.cs that establish Http client request to the service.  Inside this class, I have a method that will create response Http object.  The error is encountered in var response = client.GetAsync(methodUrl).Result, it throws a run-time exception of UriFormatException was unhandled, with Additional Information: Invalid URI: Invalid port specified

The value of methodUrlis Cart/CreateCart/72ae1432-e988-44f5-9fc9-7af9c2d0c704/C/0020010000001

In my App.config file, I have setup appSettings and added a key <add key="someAPIURL" value="https://xxx.xxx.xxx.xxx:8080 " />

I really appreciate of any help or inputs.


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>