![]() |
|
|
|||||||
![]() |
Wireless Networking - Native WiFi function 'WlanSetProfileEapXmlUserData' returns an error when attempting to set credentials. |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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? <?xml version="1.0" ?> <EapHostUserCredentials xmlns="http://www.microsoft.com/provisioning/EapHostUserCredentials" xmlns:eapCommon="http://www.microsoft.com/provisioning/EapCommon" xmlns:baseEap="http://www.microsoft.com/provisioning/BaseEapMethodUserCredentials"> <EapMethod> <eapCommon:Type>25</eapCommon:Type> <eapCommon:AuthorId>0</eapCommon:AuthorId> </EapMethod> <Credentials xmlns:eapUser="http://www.microsoft.com/provisioning/EapUserPropertiesV1" xmlns xmlns:baseEap="http://www.microsoft.com/provisioning/BaseEapUserPropertiesV1" xmlns:MsPeap="http://www.microsoft.com/provisioning/MsPeapUserPropertiesV1" xmlns:MsChapV2="http://www.microsoft.com/provisioning/MsChapV2UserPropertiesV1"> <baseEap:Eap> <baseEap:Type>25</baseEap:Type> <MsPeap:EapType> <MsPeap:RoutingIdentity>bhaddock</MsPeap:RoutingIdentity> <baseEap:Eap> <baseEap:Type>26</baseEap:Type> <MsChapV2:EapType> <MsChapV2:Username>bhaddock</MsChapV2:Username> <MsChapV2 <MsChapV2:LogonDomain>CP</MsChapV2:LogonDomain> </MsChapV2:EapType> </baseEap:Eap> </MsPeap:EapType> </baseEap:Eap> </Credentials> </EapHostUserCredentials> Here is a copy of the xml for the WPA2 with PEAP profile I've created using WlanSetProfile: <?xml version="1.0"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> <name>MBR-3a8</name> <SSIDConfig> <SSID> <name>MBR-3a8</name> </SSID> </SSIDConfig> <connectionType>ESS</connectionType> <MSM> <security> <authEncryption> <authentication>WPA2</authentication> <encryption>TKIP</encryption> <useOneX>true</useOneX> </authEncryption> <OneX xmlns="http://www.microsoft.com/networking/OneX/v1"> <EAPConfig> <EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> <EapMethod> <Type xmlns="http://www.microsoft.com/provisioning/EapCommon">25</Type> <AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</AuthorId> </EapMethod> <ConfigBlob/> </EapHostConfig> </EAPConfig> </OneX> </security> </MSM> </WLANProfile> 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 am Brendan Haddock |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to assign a returns value of a javascript function to a hiddenfield in a webpart | Chander | Software | 0 | 12-20-2007 09:14 AM |