Go Back   Velocity Reviews > Newsgroups > Wireless Networking
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

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

 
Thread Tools Search this Thread
Old 07-01-2008, 05:03 PM   #1
Default Native WiFi function 'WlanSetProfileEapXmlUserData' returns an error when attempting to set credentials.


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"
xmlnssi="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>
<MsChapV2assword>test</MsChapV2assword>
<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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46