Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

calling login in asp.net which sets a session using the network api doesn't saves the session for webview on android

$
0
0

Hi,

I wrote a little app that when started calls my asp.net web server and performs login in the background (with data saved on the device). this login page sets a session on the server for the login period.

after the user is logged he can load pages from the server (which use the session set in the login page) inside a webview.

the problem is that the server can't find the session - as if it was never initialized. this happens only on android and on iPhone works just fine.

this is the code that does the login:


this.Network.SendRequest(

    '/app/login.ashx',

    { u: username, p: password },

    function(e) {

        try {

            var loginResponse = JSON.parse(this.responseText);
            onLoginResponse(loginResponse.login ? 1 : 0);
        }
        catch(ex) {
            onLoginResponse(-1);
        }
    }

);

to the webview I just set a url.

why doesn't this work on android but does on iPhone? can it be fixed?


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>