Networking Forums

Networking Forums > Wireless Networking > Wireless Networks > Native WiFi function 'WlanSetProfileEapXmlUserData' returns an error when attempting to set credentials.

Reply
Thread Tools Display Modes

Native WiFi function 'WlanSetProfileEapXmlUserData' returns an error when attempting to set credentials.

 
 
Brendan Haddock
Guest
Posts: n/a

 
      07-01-2008, 04:03 PM
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: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">
<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:Password>test</MsChapV2:Password>
<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

(E-Mail Removed)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DCOM got error attempting to start netman gronk1115 Wireless Networks 0 08-17-2007 01:21 AM
Re: Native WIFI SDK - Windows XP SP2 - WlanConnect problem Yi Lu [MSFT] Wireless Networks 0 05-10-2007 12:14 AM
Networking Error Message When attempting to read Eudora E-Mails across a LAN victory@admiraliol.ie Home Networking 1 03-03-2007 06:59 AM
when send() function returns? Sean Linux Networking 8 06-22-2006 09:17 PM
Error 781: Attempting L2TP VPN connection Luke Edson Windows Networking 1 12-08-2003 12:19 PM



1 2 3 4 5 6 7 8 9 10 11