I have trouble using the API with Windows 11. If I run SGP normally (not in admin mode), then a form pops up when starting SGP, asking me if I want to run netsh.exe to activate the API port. I click yes of course. However, the port is still blocked. I cannot access the API command list at http://localhost:59590/metadata, nor can I send any API commands to SGP. From the logfile it also looks like SPG cannot open the API port.
If I run SGP as admin, these problems all go away (there is no popup form at all). I dont think this is a good solution in general, as several users have reported connection problems when some programs run in normal mode and some in admin mode.
Should I add SGP to the firewall, or netsh.exe, or both ? Or is this something that needs adressing in SGP ?
Thanks, Mikael
Link to Logs
Approx time of issue: 15:30
Useful Info
OS: Microsoft Windows 11 Famille Ver: 4.2.0.955 (32-bit) .NET: 4.8 ASCOM: 6.6.1.3673
We definitely agree with this. Running in admin mode can create a whole host of other interoperbility issues.
We always run on Windows 11 and never in admin mode so, at first glance, I am unsure where this comes from.
What version of Windows is it? Home?
If you are inclined to experiment, this is the script we run when we try to reserve the port. We have always meant to make this more dynamic and work harder to find a free port, but it hasnât ever seemed to be a problem.
Maybe itâs a localization issue? Itâs doubtful, but I am curious what happens when you run that script manually.
On my laptop running Windows 11 Pro English version I have had zero issues. One my PC tower running Windows 11 Home French version the API isnât reserved, meaning the API doesnât work and it doesnât appear on the list when typing ânetsh http show urlaclâ.
Ken, I played around with the netsh in the command prompt, and this is what I learned on my Windows 11 French version.
Running CMD in admin mode I can reserve the url if I use my specific username âafzeliusâ, like this:
After this I can run SGP and acces the API, even in normal mode (not admin mode). Btw, I cannot reserve the url without running CMD in admin mode.
However, neither the Everyone or Tout le monde usernames work, and they give different errrors. I think on this French system it should be Tout le monde, but netsh maybe doesnât handle spaces ? And I could not get it to work with neither ââ, nor ââ around the Tout le monde.
Looks to be a regional issue thing to me ?
If you have any other ideas I can test them.
Mikael
Yes, that seems a certainty here. Thanks for all the additional info⊠Iâll need to do some thinking and research to better understand how to approach this issue (or maybe use a different method altogether since SGPro cannot have knowledge of a username with admin privileges ubkess user provides it).