windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server https://softhier.com/ instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

Issue with iron-ajax request

Asked By: Anonymous

I have the following Web API method:

[Route("api/ConfAccount/ByToken")]
    public conf_account GetByToken(string token)
    {
        conf_accountDAO dao = new conf_accountDAO();
        try
        {
            string tokenJson = Crypto.DecryptStringAES(token, "S1gn2s2f3!");
            if (tokenJson != null)
            {
                Token myToken = Newtonsoft.Json.JsonConvert.DeserializeObject(tokenJson) as Token;
                var obj = dao.GetObjectByUser(myToken.name);
                if (obj != null)
                {
                    return obj as conf_account;
                }
                else
                {
                    return null;
                }
            }
            else
            {
                return null;
            }
        }
        catch {
            return null;
        }
    }

I tried to make a request from a Polymer web application, I have an element that call this method but I don’t find a way to configure correctly the iron-ajax object to call this method:

Element

<dom-module id="my-welcome">
<template>
    <style>
        :host {
            display: block;
        }
        .div-general{
            @apply(--layout-horizontal);
            width: 100%;
            height: 40px;
            vertical-align: middle;
            display: table-cell;
        }
        .span-center-middle{
            vertical-align: middle;
        }
    </style>
    <iron-ajax
        verbose
        url="http://192.168.0.16/SignaSafePro/api/ConfAccount/ByToken?"
        method='GET'
        params = '{{token}}'
        headers='{"Accept": "application/json"}'
        handle-as="json"
        content-type="application/json"
        on-response="handleResponse"
        debounce-duration="300"
        id='ajaxWelcomeElement'>
    </iron-ajax>
    <iron-localstorage name="my-signasafe-storage" id="localStorage_id" auto-save-disabled useRaw></iron-localstorage>
    <div class="div-general">
        <paper-icon-button icon="account-circle" id="icon_account"></paper-icon-button>
        <span class="span-center-middle">{{welcome_text}}</span>
    </div>
</template>
<script>
    Polymer({
        is: 'my-welcome',
        properties: {
            conf_account: {
              type: Object,
              notify: true
            },
            welcome_text:{
                type: String,
                notify: true
            },
            token:{
                type: String,
                notify: true
            }
        },
        ready: function() {
            var localstorage = this.$$('#localStorage_id');
            localstorage.reload();
            var tokenAux = localstorage.value;
            this.token = tokenAux;
            var obj = this.$$('#ajaxWelcomeElement');
            if(this.token != null){
                obj.generateRequest();
            }else{
                this.welcome_text = 'Welcome Guest';
            }
        },
        handleResponse: function(request){
            var result = request.detail.response;
            if(result.ResultObject != null){
                this.conf_account = result.ResultObject;
                if(this.conf_account != null){
                    this.welcome_text = 'Welcome ' + this.conf_account.conf_account_name;
                }else{
                    this.welcome_text = 'Welcome Guest';
                }
            }
        }
    });
</script>

I’m getting the Url Request in the console:

http://192.168.0.16/SignaSafePro/api/ConfAccount/ByToken?&0=E&1=A&2=A&3=A&4=A&5=C&6=0&7=q&8=c&9=0&10=o&11=C&12=h&13=6&14=U&15=H&16=E&17=3&18=V&19=z&20=o&21=v&22=s&23=k&24=T&25=i&26=m&27=5&28=y&29=r&30=p&31=N&32=Z&33=v&34=Z&35=h&36=j&37=z&38=9&39=Y&40=v&41=O&42=S&43=p&44=d&45=q&46=r&47=H&48=w&49=l&50=D&51=m&52=3&53=o&54=G&55=0&56=a&57=A&58=K&59=y&60=R&61=R&62=v&63=q&64=F&65=B&66=m&67=4&68=v&69=S&70=P&71=T&72=P&73=9&74=B&75=P&76=R&77=C&78=7&79=R&80=s&81=m&82=X&83=M&84=X&85=C&86=j&87=U&88=X&89=u&90=f&91=o&92=s&93=8&94=i&95=C&96=2&97=z&98=C&99=o&100=y&101=c&102=B&103=0&104=1&105=O&106=h&107=B&108=J&109=n&110=L&111=L&112=2&113=B&114=7&115=J&116=O&117=q&118=Q&119=i&120=S&121=F&122=L&123=V&124=6&125=1&126=6&127=I&128=0&129=d&130=H&131=f&132=u&133=X&134=%2F&135=R&136=6&137=c&138=O&139=r&140=B&141=N&142=X&143=r&144=v&145=T&146=b&147=g&148=O&149=f&150=K&151=K&152=%2B&153=N&154=2&155=k&156=e&157=q&158=0&159=2&160=y&161=3&162=X&163=9&164=a&165=Z&166=S&167=n&168=A&169=R&170=U&171=f&172=x&173=G&174=Z&175=%2F&176=n&177=p&178=1&179=d&180=R&181=%2B&182=X&183=b&184=W&185=8&186=m&187=y&188=y&189=y&190=e&191=8&192=h&193=D&194=y&195=g&196=P&197=H&198=g&199=m&200=W&201=d&202=P&203=y&204=Y&205=H&206=j&207=0&208=z&209=T&210=b&211=8&212=U&213=b&214=9&215=Q&216=b&217=W&218=e&219=2&220=E&221=K&222=c&223=l&224=E&225=k&226=f&227=p&228=4&229=k&230=9&231=f&232=E&233=Z&234=o&235=a&236=2&237=c&238=n&239=I&240=D&241=Z&242=X&243=g&244=T&245=f&246=y&247=r&248=X&249=Q&250=B&251=Z&252=%2B&253=1&254=J&255=%2F&256=y&257=l&258=c&259=b&260=9&261=w&262=%3D&263=%3D

I don’t know why the url get that way because the url suppose to be:

GET api/ConfAccount/ByToken?token={token}

Please I really appreciate any help on this.

Note:

The error that I’m getting is the Error: 404


Solution

Answered By: Anonymous

I solved the problem changing the iron-ajax element in this way:

<iron-ajax
        verbose
        url="http://192.168.0.16/SignaSafePro/api/ConfAccount/ByToken?token={{token}}"
        method='GET'
        handle-as = "json"
        content-type = 'application/json'
        on-response="handleResponse"
        debounce-duration="300"
        id='ajaxWelcomeElement'>
    </iron-ajax>

Thanks

techinplanet staff

instagram volgers kopen volgers kopen buy windows 10 pro buy windows 11 pro


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno
Alanya escort Manavgat escort Fethiye escort Kemer escort Didim escort Çanakkale escort Aydın escort Muğla escort Tekirdağ escort Manisa escort Balıkesir escort Trabzon escort Elazığ escort Ordu escort Kütahya escort Isparta escort Rize escort Kahramanmaraş escort Yalova escort Giresun escort Yozgat escort Tokat escort Şanlıurfa escort Sivas escort Batman escort Erzurum escort Sinop escort Kırşehir escort Karaman escort Kırıkkale escort Bolu escort Amasya escort Niğde escort Uşak escort Edirne escort Çorum escort Osmaniye escort Zonguldak escort Van escort Erzincan escort Söke escort Bodrum escort Çerkezköy escort Akhisar escort Bandırma escort Ayvacık escort Akçaabat escort Karakoçan escort Altınordu escort Tavşanlı escort Eğirdir escort Ardeşen escort Afşin escort Altınova escort Bulancak escort Sorgun escort Erbaa escort Viranşehir escort Zara escort Kozluk escort Aziziye escort Ayancık escort Kaman escort Ermenek escort Keskin escort Gerede escort Göynücek escort Bor escort Banaz escort Havsa escort Osmancık escort Bahçe escort Alaplı escort Başkale escort Kemah escort Nazilli escort Fethiye escort Çorlu escort Alaşehir escort Altıeylül escort Biga escort Araklı escort Kovancılar escort Fatsa escort Simav escort Yalvaç escort Çayeli escort Dulkadiroğlu escort Çiftlikköy escort Espiye escort Sarıkaya escort Niksar escort Suruç escort Yıldızeli escort Sason escort Horasan escort Boyabat escort Mucur escort Sarıveliler escort Yahşihan escort Göynük escort Gümüşhacıköy escort Çamardı escort Eşme escort İpsala escort Sungurlu escort Hasanbeyli escort Çaycuma escort İpekyolu escort Refahiye escort Kuşadası escort Marmaris escort Süleymanpaşa escort Turgutlu escort Susurluk escort Gelibolu escort Of escort Ünye escort Domaniç escort Fındıklı escort Elbistan escort Çınarcık escort Tirebolu escort Akdağmadeni escort Turhal escort Eyyübiye escort Suşehri escort Yakutiye escort Gerze escort Mengen escort Merzifon escort Ulukışla escort Sivaslı escort Keşan escort Kadirli escort Ereğli escort Özalp escort Tercan escort Efeler escort Didim escort Çine escort Dalaman escort Menteşe escort Milas escort Ortaca escort Seydikemer escort Ergene escort Kapaklı escort Malkara escort Salihli escort Şehzadeler escort Soma escort Yunusemre escort Ayvalık escort Bigadiç escort Burhaniye escort Gönen escort Karesi escort Çan escort Yenice escort Ortahisar escort Yomra escort Perşembe escort Pazar escort Onikişubat escort Pazarcık escort Türkoğlu escort Eynesil escort Görele escort Piraziz escort Yağlıdere escort Çayıralan escort Boğazlıyan escort Zile escort Siverek escort Karaköprü escort Haliliye escort Akçakale escort Şarkışla escort Gemerek escort Oltu escort Palandöken escort Mudurnu escort Suluova escort Taşova escort Toprakkale escort Kilimli escort Tuşba escort Üzümlü escort