Receiving “Path 'OPTIONS' is forbidden.” Exception in ASP.NET website

前端 未结 6 1596
粉色の甜心
粉色の甜心 2021-02-07 11:35

I am getting the error System.Web.HttpException: Path \'OPTIONS\' is forbidden. since we moved our website over to a new server setup. I am unable to recreate the e

6条回答
  •  独厮守ぢ
    2021-02-07 12:00

    When I got this exact error while trying to send an .xls file from an ASP.Net web page, it was because I had omitted the filename extension here:

    Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
    Response.ContentType = "application/vnd.ms-excel";
    

    That fileName needs to be fileName.xls

提交回复
热议问题