Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
__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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!