The service has not been started [duplicate] - c#

I am using the native Wifi Api to fetch the ssid on windows 8 machine but the "WlanOpenHandle" call always fails with the error code 1062. Any help?
Note: there is no wzc service on windows 8.

As confirmed by the OP, the proximate cause of the error was that the service "WLAN AutoConfig" was not running. This requirement does not seem to be documented; I've added a note in the community contributions section.

Related

How to troubleshoot remote UWP AppService problems?

I'm playing around with remote UWP AppServices in C# and I run into a very early roadblock: Getting a RemoteSystem instance.
I followed the tutorial on https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/communicate-with-a-remote-app-service with my own code and I tried out the RemoteSystems sample as part of https://github.com/Microsoft/Windows-universal-samples
Unfortunately, the result is always the same.
First I request access to remote systems:
RemoteSystemAccessStatus status = await RemoteSystem.RequestAccessAsync();
This is successful: status has the value RemoteSystemAccessStatus.Allowed.
Next, I create a HostName instance:
var deviceHost = new HostName("computer2");
Then I want to get a RemoteSystem instance:
RemoteSystem remoteSystem = await RemoteSystem.FindByHostNameAsync(deviceHost);
This throws an exception:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
What I tried
Searching the web doesn't bring up much at this time (remote UWP AppServices are too new)
The event log doesn't have anything interesting in it
The Windows firewall seems to be configured correctly (this seems to be done automatically by Visual Studio)
What I'm looking for
One of my computer was upgraded from Windows 7 to Windows 10, the other from Windows 8.1 to Windows 10. So there is a chance my computers are "misconfigured" in some way (I remember the unnecessary task scheduler entries for Windows Media Center...)
My question: What are recommended practices to troubleshoot these kinds of problems? Are there tools that can help me? Right now I'm now even sure where to start looking...

hresult from IMbnInterfaceManager::GetInterfaces when no MBN device exists

I have the following code working in Windows 7:
MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager();
IMbnInterfaceManager mbnInfMgrInterface = mbnInfMgr as IMbnInterfaceManager;
if (mbnInfMgrInterface != null)
{
IMbnInterface[] mobileInterfaces = mbnInfMgrInterface.GetInterfaces() as IMbnInterface[];
}
No problems when the MBN device exists but when an MBN device doesn't exist I get the following exception in the call to GetInterfaces():
{System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
at MbnApi.IMbnInterfaceManager.GetInterfaces()
at foo.Program.configureConnection() in foo}
Question
Is there something that should be done to check for a MBN interface before calling GetInterfaces? I can simply catch this exception but I can't find any documentation that says this exception is the same as having no interfaces.
The closest thing I have found on statckoverflow is this
struggling with mobile broadband api windows 7 and windows 8 with C#, not sure what to install
which implies that maybe windows 7 behaves differently than windows 8.1.
I got the same Element not found exception trying to use GetSignalStrength() and MbnInterfaceManager I instead found you can obtain a lot of useful info using WMI. Please see the answer here using SELECT * FROM Win32_PerfRawData_Tcpip_NetworkInterface:
struggling with mobile broadband api windows 7 and windows 8 with C#, not sure what to install
UPDATE:
Please note that I found you cannot get the network info in Windows 8.1 in the same way as you do in Windows 7. See How can I install an application that requires WMI capabilities on Windows 8.1 to determine available bandwidth? and https://code.msdn.microsoft.com/windowsapps/network-information-sample-63aaa201

facebook-c#-sdk for windows phone mango 7.1, log-in fail

I have The following problem:
I use facebook-c#-sdk for windows phone 7.1(mango version), taken from here:
http://facebooksdk.codeplex.com/releases/view/76445 with the samples too,for compatibility question, I've recompiled the samples project situated inside the folder called "FacebookCSharpSDK\Samples\CS-WP7" for mango, after opening the application, I logged-in on the facebook form login and immediately after coming out a, maybe, error message.Here is the screenshot of the problem: http://img854.imageshack.us/img854/6276/wp7error.png
Thanks for the help.
Solved, i've discovered a bug about the touch device in the facebook-sdkafter the code: loginParameters["response_type"] = "code";type in a new line this code:loginParameters["display"]="wap";

Marketplace windows phone beta test Error code: 805a0194

After adding the application in the Marketplace for beta testing, when I try to open a link in the application beta testers shows Error code: 805a0194. And none of the testers can download the application to test ... what to do? what is this error? After adding an application to the App Hub's been 2 days.
Windows error codes like that are fairly easy to reverse-engineer. The 8 makes it a fatal error. The 0x5a is the 'facility code', an indication what component caused the error. 90 is undocumented right now in WinError.h, probably means "Windows Phone". The last word is the error code.
0x194 = 404. The Universal Internet File-not-found Error Code. Something wrong with the url you use.
Beta submission takes 4 hours to complete – the app then becomes “published”. It takes another 8 hours before the app becomes available for download.

System.Management.ManagementException: Not found

I am running the following code:
ManagementClass oMClass = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection colMObj = oMClass.GetInstances();
which is throwing this exception:
System.Management.ManagementException: Not found
at System.Management.ThreadDispatch.Start()
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObject.Initialize(Boolean getObject)
at System.Management.ManagementClass.GetInstances(EnumerationOptions options)
at System.Management.ManagementClass.GetInstances()
I went to check on the running services on Windows XP and found that Windows Management Instrumentation service has a status of 'Started'. I tried restarting the service but that didn't do any good.
I then tried to get the status of this service from within my running code using the ServiceController class:
ServiceController wpiService = new ServiceController();
wpiService.ServiceName = "Winmgmt";
string wmiStatus = wpiService.Status.ToString();
MessageBox.Show("WMI status= " + wmiStatus);
wmiStatus evaluates to 'Running'.
I have seen this error on only one of multiple machines running the same software. What's peculiar is that the machine was running smoothly for months, and then suddenly started showing this error.
Any clue as to what might be causing this?
I have also run into this issue. Here is one of the previously mentioned online resources explaining how one can fix WMI:
http://windowsxp.mvps.org/repairwmi.htm
The method of repairing seems to be different between different versions of Windows as explained on that page.
I had this problem on none of these versions, but on Windows Embedded Standard 2009. Since Windows XP Service Pack 2 is closest related to the listed OSes, that is the one I used:
For Windows XP Service Pack 2
Click Start, Run and type the following command:
rundll32 wbemupgd, UpgradeRepository
This command is used to detect and repair a corrupted WMI Repository. The results are stored in the setup.log (%windir%\system32\wbem\logs\setup.log) file.
The solution was to repair WMI on Windows XP. I don't have the detailed step by step fix (I'm not the one who implemented the fix), but my understanding is that a repository related to this service can get corrupted and there's a Windows utility that can repair it. There are several online resources on how to do this.

Categories