Login shows 404 error

k365
i was trying the sample c# application, but after login and confirming the details, it just goes to 404 error page. let me know what would be the issue in authentication process ?
  • sujith
    Hi,
    It redirects to registered redirect url. You have to change redirect url or just use request token from url.
  • botany02
    @k365

    The possible reason could be,
    if You are using web browser control for login and Your redirect url is http://127.0.0.1,
    then if you are not running local web server, your http://127.0.0.1 may not be reached.
    So it gives 404 error.Running a Local Webserver will solve the issue.
    Or
    Your redirect url may be not a valid url
  • k365
    so shall i try giving a URL of my website page ? will it help ?
    and is SSL required if website url is given for redirection... ??
  • botany02
    botany02 edited November 2016
    Yes, You can give any valid Url.
    ssl is not required.
    Which library u r using...?
  • k365
    i am trying to run the sample application of c#
    http://www.howutrade.in/docs/kitedotnet/html/SampleKite.zip
  • k365
    it is given while creating app that we can use http://127.0.0.1 for testing... is that creating issue ?

    i have also seen the webinar.. here
    https://kite.trade/forum/discussion/807/getting-error-invalid-session-credentials#latest

    i was also trying to do the same thing for long time, but unable to get the access token. i am following the same steps as shown in webinar for authentication in browser

    is there something running at background or some software or server to test at http://127.0.0.1 ? i dont code in PHP. i work in asp.net and c#

    i hope the experts of c# here can guide me

  • botany02
    @k365

    Since You are using KiteDotNet Library, You no need to use browser to get access token.
    Just call the GetAccessToken method after login.
    And also KiteDotNet comes with local Webserver, that will automatically start local webserver if it is not running.
    So there wouldn't be any issue in using http://127.0.0.1 in redirect_url.
  • k365
    is thr any email whr i can send the screenshots of the problem ?
  • k365
    k365 edited November 2016
    now in sample kite application of c#
    login is done
    account details confirmed
    it shows message to give permissions done
    then after giving permissions, it shows 404 error and nothing comes

    further when i close its window, it shows login aborted by user.

    what should i do to get the access token. atleast the sample app should work correctly. or is there any setting pending ?

    i was thinking of postback url ? but it requires https url which i dont have.. is tht creating problem or any alternate for tht ?

    second thing...
    when i do the whole process manually in browser in address bar... i get the below error:
    {"status": "error", "message": "Route not found", "error_type": "GeneralException"}

    i am struggling for this authentication problem, tried all for last 2 months, no success for access token...urgent help is required.. any expert plz help
  • sujith
    Hi,

    After permission screen your App will be redirected to registered redirect url. It is explained in this webinar.


    Can you private message your redirect url?
  • k365
    i have sent you the message
    further, i have already gone thru tht video 2 days back. i can very well understand the workflow but dont know where it is lacking when i code

    see there are 2 scenario here..
    1. when try to use SampleKite application, the browser window does not close after i agree to the permissions. then manually closing it shows error - aborted by user.

    2. i tried KiteCore project. it somehow reached to the accesstoken part..
    dynamic data = DataHelpers.Saveaccesstoken(ref kitecon, token);
    but here it gets error in request() method at line...
    string uri = this._routes[route];

    error: "The given key was not present in the dictionary."

    now can anyone guide me in this ?? any of the 2 scenario ?

    thanks
  • botany02
    @k365

    If you are using SampleKiteApp, Just follow the Below Steps.
    Login to your Kite Developer a/c. Ensure Your Redirect url is http://127.0.0.1
    If not change it to http://127.0.0.1 & Save.

    In your PC
    Go to Internet Options --> Security --> Trusted Sites --> Add http://127.0.0.1

    Now Just Run the SampleKiteApp, it should work.

    If face any issue, Private message your contact.
  • k365
    @botany02
    yes i have done the same settings already
    also i tried to use my personal website too. but redirect url is not creating the issue. the problem is after login and authorise, the browser window that pops up should close automatically, but it doesnt
    so when i close it manually, it shows "login aborted by user"

    i think the browser form page that pops out should close itself or there should be a manual close button for it. further i hope...if the browser popout form source code gets available with sample project...it would be better to debug and find out why its not closing.
  • botany02
    On successful login, the window will close automatically..
    We are using it without any problem, there should be something you are missing.

    I Have sent couple of private message to reach you..Didn't get any response from you..

  • k365
    what is the time period for login session? i mean after generating access token, when will it expire ?
  • sujith
    Hi,
    Access token is valid till next day morning.
  • k365
    k365 edited December 2016
    what time ? i mean do i have to login everyday ? and at wht time ?

    can we extend the session period for this like to 1 week or month ?
  • sujith
    Hi,
    All access tokens are flushed every morning around 8:30 AM.
    It is mandatory by exchange that user has to login everyday.
  • k365
    can we do the automated login process ?

    i mean, without that browser window popping up.. can we directly pass username and pass for login and getting access token ?
  • sujith
    I am afraid you cannot do that.
Sign In or Register to comment.