Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Fix for older versions of ASF.json
Browse files Browse the repository at this point in the history
  • Loading branch information
alvr committed Dec 17, 2016
1 parent cf6b923 commit 93820fa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ASFui/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ private static string GetEndpointAddress()
var json =
JObject.Parse(
File.ReadAllText(Path.GetDirectoryName(Settings.Default.ASFBinary) + @"/config/ASF.json"));
var hostname = json["WCFHost"].ToString();

string hostname;
try
{
hostname = json["WCFHost"].ToString();
}
catch
{
hostname = json["WCFHostname"].ToString();
}
var port = json["WCFPort"].ToString();

return "net.tcp://" + hostname + ":" + port + "/ASF";
Expand Down

0 comments on commit 93820fa

Please sign in to comment.