I am trying to use the Native WiFi API on Windows Vista to connect to
an access point via WPA2 using PEAPv0/EAP-MSCHAPv2. I can connect to the
access point via the API just fine when Windows automatically uses my
Windows account user credentials for the authentication. However, when I
try to specifically set my credentials using WlanSetProfileEapXmlUserData,
the function returns error 127. Also, in the debugger output window, the
following line appears after calling the function:

First-chance exception at 0x762242eb in Wireless Utility.exe:
Microsoft C++ exception: EapHost::EapException at memory location
0x020cf140..

I am using the following xml for my credentials in the function. Is
there something wrong with my xml? What else could be causing the error?


xmlns="http://www.microsoft.com/provisioning/EapHostUserCredentials"
xmlns:eapCommon="http://www.microsoft.com/provisioning/EapCommon"
xmlns:baseEap="http://www.microsoft.com/provisioning/BaseEapMethodUserCredentials">

25
0

xmlns:eapUser="http://www.microsoft.com/provisioning/EapUserPropertiesV1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:baseEap="http://www.microsoft.com/provisioning/BaseEapUserPropertiesV1"
xmlns:MsPeap="http://www.microsoft.com/provisioning/MsPeapUserPropertiesV1"
xmlns:MsChapV2="http://www.microsoft.com/provisioning/MsChapV2UserPropertiesV1">

25


bhaddock

26

bhaddock
test
CP







Here is a copy of the xml for the WPA2 with PEAP profile I've created
using WlanSetProfile:


xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
MBR-3a8


MBR-3a8


ESS



WPA2
TKIP
true



xmlns="http://www.microsoft.com/provisioning/EapHostConfig">

xmlns="http://www.microsoft.com/provisioning/EapCommon">25
xmlns="http://www.microsoft.com/provisioning/EapCommon">0









Thanks for your help. I need to be able to allow the user to change
their credentials using the utility I am writing, but I haven't been able to
figure out what is causing this issue.

Best Regards,

Brendan

Brendan@newsgroup.nospam