Forum Discussion
Sharon_Lucas_55
Nimbostratus
Apr 28, 2010Problem authenticating if password contains a @
I'm using the iControl SDK to create a Java application that automates configuring BIG-IP.
If my admin password for BIG-IP does not contain a @, authentication to the BIG-IP host via my Jav...
Luke_Lehman
Employee
Jun 16, 2010All,
So I guess I somewhat found a way 'around' the problem - but I don't care - it WORKS!!
Credit is due in most part to hoolio for his comment about how url encoding works in 10.x. I thought - "Hey, why don't I try that in my code. Eureka!
web_ltmview.Url = new Uri(
"https://" +
txt_username.Text +
":" +
System.Web.HttpUtility.UrlEncode(txt_password.Text) +
"@" +
ltmDerived +
".domain.com/" +
"tmui/Control/form?_form_holder_opener_=&handler" +
"=%2Ftmui%2Flocallb%2Fnetwork_map&handler_before=%2Ftmui%2Flocallb%2Fnetwork_map&showObjList=&showObjList_befor" +
"e=&hideObjList=&hideObjList_before=&enableObjList=partition_control&enableObjList_before=&disableObjList=&disa" +
"bleObjList_before=&form_page=%2Ftmui%2Flocallb%2Fnetwork_map.jsp&form_page_before=%2Ftmui%2Flocallb%2Fnetwork_" +
"map.jsp&error_page=%2Ftmui%2Flocallb%2Fnetwork_map.jsp&error_page_before=%2Ftmui%2Flocallb%2Fnetwork_map.jsp&s" +
"how_map=1&show_map_before=0&status_select_before=null&status_select=0&object_type_select_before=null&object_ty" +
"pe_select=&SearchString=" +
txt_serverIp.Text +
"&SearchString_before=*&irule_body_before=unchecked&Show+Summary_before=Show+Summary&Show+Map=Update+Map&Show+M" +
"ap_before=Update+Map"
);
The magic is all here:
System.Web.HttpUtility.UrlEncode(txt_password.Text)
Replaces any special char with a string that doesn't throw an exception.
Thanks everyone (very very much) !!
-Luke
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects