Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
__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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda