Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

165
Visualizações
__DoPostback javascript event handlers don't work after deploy to Azure websites

In my ASPX (MVC) page, I set up a JS function

        <script language="javascript" type="text/javascript">
        function changehref(param) {
        __doPostBack('i2e',  param);                
        }   

in the codebehind, I check for the value of i2e as follows:

        public void Page_Load(object sender, System.EventArgs e)
    {
        PostBackStr = Page.ClientScript.GetPostBackEventReference(this, "i2e");
        PostBackStr = "";
        if (Page.IsPostBack)
        {
            bool is_i2e = Request["__EVENTTARGET"] == "i2e"; // btnSave
            string i2e_val = Request["__EVENTARGUMENT"];
            if (is_i2e)
            {
                PostBackStr = i2e_val;
            }

Well, the code above works great in Visual Studio 2019 using the local (dev) Web server, but when I deploy the solution in toto to Azure Web hosting, it is as though IIS is ignoring the Postbacks.

Anyone run into this issue? I checked to see if Content-Security-Policy or Strict-Transport-Security was coming back in the response headers from the (IIS 10.0) web server, there are some cookies being set that may be 'neutralizing' __DoPostback:

('Set-Cookie', 'ASP.NET_SessionId=gqu1kx3kg4pibjl2hr1ot0iw; path=/; HttpOnly; SameSite=Lax, ARRAffinity=5ecc95fa5ba7d2943961f71828ad79ba0870393e24b3a564ea7999feae92443f;Path=/;HttpOnly;Secure;Domain=xxxx.azurewebsites.net, ARRAffinitySameSite=5ecc95fa5ba7d2943961f71828ad79ba0870393e24b3a564ea7999feae92443f;Path=/;HttpOnly;SameSite=None;Secure;Domain=xxxx.azurewebsites.net')

Any help/advice greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

oopsie, forgot that I was running NoScript on my default browser (Firefox), locally I used Chrome which doesn't have NoScript extension.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda