Angus Robertson 577 Posted October 11, 2021 When I run a server application under the Delphi 2007 debugger on Windows 11, I'm seeing a lot of these lines in the debug window, although the server is behaving as expected with no new errors. Debug Output: onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\nlansp_c.dll!6A1C85D4: (caller: 7523CD00) LogHr(16) tid(4c44) 8007277C No such service is known. The service cannot be found in the specified name space. Process webapp_telecom.exe (12000) No idea why onecore or net is being used, this is a Win32 application. I've had a DNS problem on the PC since I upgrade to W11 last week, lookups are sluggish as If it's trying the wrong server first, but nothing in the event logs. Angus Share this post Link to post
idontknow 0 Posted May 2, 2022 (edited) Hello Angus, could you track down the issue? I have the same mysterious debug outputs, if i start my server application (win32) in the debugger of Delphi 11.1 Patch1 on Windows 11 Pro 64 (Multilingual Version). First occurance of the debug output is directly under the line: Module Load: NamespaceServiceProvider.dll Same Application on same Delphi-Version on another computer running under Windows 10 Pro 64 doesn't show these debug outputs. There is also no line about loading NamespaceServiceProvider.dll My Server Application is using Indy for some UDP-Stuff and ICS for setting up a TCP-Server. Best regards, Oliver Edited May 2, 2022 by idontknow Share this post Link to post
idontknow 0 Posted May 2, 2022 a little bit more information: I get the debug output on my machine in german. I found it with the exact same words here Windows Socketfehlercodes (Winsock2.h) - Win32 apps | Microsoft Docs and yours here Windows Sockets Error Codes (Winsock2.h) - Win32 apps | Microsoft Docs So the debug output is WSASERVICE_NOT_FOUND 10108 But I have no idea why, i also tried to remove things like DNS-Lookup, determine IP-Addresses temporarily from my software. The error remains. Share this post Link to post
Angus Robertson 577 Posted May 2, 2022 I am still seeing those debug lines in my main web server application, but not in two other ICS sample web servers. But this is purely something I see under the Windows 11 debugger, the server itself on two Windows Server 2018s is handling tens of thousands of requests daily and one Windows Server 2022. My other Windows 11 DNS problem turned out to be no gateway on one of the two network adapters. Angus Share this post Link to post
Michael II 0 Posted October 1, 2022 (edited) Same "Debug Output" on my new notebook (just installed Delphi., Corel and Microsoft Office, deinstalled McAfee). Delphi 11.2 - WIndows 11 22H2 Build 2623.730 - ICS 8-69 On my machine the debug output is caused by (OverbyteIcsWinsockImpl.Inc) function Ics_gethostname. Link to german DP: Delphi Debug-Ausgabe - Delphi-PRAXiS (delphipraxis.net) #5 Edited October 1, 2022 by Michael II Share this post Link to post
Angus Robertson 577 Posted October 2, 2022 Thanks, since my last post I've updated my application from D2007 to D11.2, but still seeing debug lines. I'll now look very closely at Ics_gethostname and change it if possible. Angus Share this post Link to post
Angus Robertson 577 Posted October 3, 2022 (edited) Did the German language post suggest an alternative API? gethostname is used by the ICS LocalHostName function, and from my reading there is no alternative API. I guess the namespaceserviceprovider debug error is because the computer host name can come from several places, and internally an error on one location will cause it to look elsewhere. So it's something we just have to live with. A Stack Overflow suggests it's a Windows 11 bug: The behaviour you're seeing seems to be due to Layered Service Providers being deprecated as of Win11 (and potentially an upcoming Win10 update). GetHostByName is listed as deprecated, but GetHostName is not and also displays the same behaviour. In both cases the method queries any available namespace service providers first and then falls back to querying the NetBIOS name if none are found. As of Win11 it seems the call to enumerate the namespace service providers fails internally, generating the debug output you see. Angus Edited October 3, 2022 by Angus Robertson Share this post Link to post
Michael II 0 Posted October 4, 2022 Hello Angus thank you very much for your answer - and for all the great work you do. No, no suggestion about an alternative API - in #6 himitsu just explains why you didn't use the (unit winapi.winsock) gethostname function directly (reason: Minimum supported client Windows 8.1,). In #3 jaenicke explains how one can find the line of code that causes the debugoutputstring. This might be something for the microsoft feedback hub. (I am not sure if my inputs ever have been read by m$ - but if Angus from ICS would post... ;-)) Regards Michael Share this post Link to post
Angus Robertson 577 Posted October 4, 2022 Not sure the current Microsoft API information is correct, I thought gethostname goes back to the early days of Windows, and Microsoft simply no longer documents versions of Windows it does not support. Reporting bugs to Microsoft is hard work, a while back I did get one fix where a SQL ADO DLL was leaking a handle for each async call, but it took a lot of effort, I rewrote my application to use a thread instead. Angus Share this post Link to post