cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
650
Views
0
Helpful
3
Replies

Authentication when pushing XML to a phone

msmalley
Level 1
Level 1

I am attempting to create a small application that will push an xml page to a phone. I can do it with a simple ASP page and POSTing to http://ipaddress/CGI/Execute

However; when I execute the POST I am prompted for credentials. When I enter the credentials in my browser the POST works fine.

What I want to know is how can I include the credentials in the ASP page so I am not prompted? I have looked at the SDK and reviewed the samples but I don't know java to translate it into vbScript.

I am only looking for basic authentication.

Do I have to encode the username and password into base64?

If so is there a special key that has to be used in the encryption process?

Here is my asp code.

<html>

<head>POST to Phone at 10.10.10.36</head>

<body>

<P>

<!-- Need a form with an action that goes to the case-sensitive URL for the Phone you want to POST to. -->

<form action="http://10.10.10.36/CGI/Execute" method="POST" >

<!?There must be a form field that contains the xml data for the Phone action and it must be named XML case-sensitive. -->

<textarea COLS=60 ROWS=10 name="XML">

<CiscoIPPhoneExecute>

<ExecuteItem Priority="0" URL="Play:chime.raw" />

<ExecuteItem Priority="0" URL="http://10.10.10.201/alert.xml" />

</CiscoIPPhoneExecute>

</textarea>

</P>

<P>

<input type="submit" value="Push" />

</P>

</form>

</body>

</html>

Ultimately I want to put this in a desktop app so if anyone would like to share the process to post to a phone in .NET, it would be GREATLY appreciated.

Thanks in advance.

3 Replies 3

Sascha Monteiro
Level 6
Level 6

you could put it in the url;

http://myUserID:myPassWord@10.10.10.36/CGI/Execute

hth

Sascha

Thank you for the quick reply.

I tried that and it didn't work. The page didn't even look like it tried to push the xml to the phone.

http://admin:admin@10.10.10.36/CGI/Execute" method="POST" >

Thanks. I will keep looking.

If your end goal is a desktop app, why not go for it directly, since it is rather simple. A quick google search yielded plenty of results that could be used as a template. For instance, this one: http://xmlgateway.its.utexas.edu/docs/c_sharp_ex_http.html

That one even does certificate authentication, but I'm sure you'll have an example with basic authentication a minute from browsing to google :)