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!
oopsie, forgot that I was running NoScript on my default browser (Firefox), locally I used Chrome which doesn't have NoScript extension.