[英]Requesting ashx Web Handler is showing dialog to download the ashx file?
我已經創建了一個Login.ashx Web處理程序,以使用以下REST請求對用戶進行身份驗證:
http://192.0.0.0/Pages/LoginPage.ashx?Username=anonymous&Password=123
當我想測試我的處理程序時,我打開了瀏覽器並粘貼了鏈接,對話框詢問我是否要保存“ .ashx”文件,
任何指南或幫助將不勝感激。
都是我在執行以下響應內容類型時的錯:
原為:
context.Response.ContentType = "text/text";
現在:
context.Response.ContentType = "text/xml";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.