perhaps? 2014-06-11 11:48 采纳率: 100%
浏览 166

jQuery ajax调用返回302

I searched and there are a few similar post like this on forum but I still could not solve my problem.

The project I am working on is ASP.NET WebForms. On my default.aspx, I make a ajax GET request to page method, inside this method I simply return back to client by writing Response.Write

The problem is it works properly at local which uses HTTP protocol. But when I deploy it to my server which uses HTTPS protocol, AJAX request returns 302 code(similar to other posts).

The urls for default page and for ajax request are something like: https:///default.aspx and https:///ajax.aspx?action=something

So I believe this is not cross domain issue.

This is the weird part, when I tried to set up my site at local to run on HTTPS, it works property. I also tried solutions from other posts but no luck.

My local is running on Win 8.1, IIS 8, my server is running on Win 2k3, IIS 6

Will there be any issue because of that?

What do you suggest me to look at next, any ideas would be appreciated.

Thanks

  • 写回答

1条回答 默认 最新

  • weixin_33716557 2014-07-01 03:52
    关注
    ** UPDATE ANSWER **
    

    Such a silly mistake, I thought the whole website runs under HTTPS.

    My default page is under HTTPS but my ajax endpoint does not

    So the obvious solution is make ajax endpoint runs under HTTPS or create method call in default page and invoke it instead.

    I chose the first option.

    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?