简体   繁体   中英

Requesting ashx Web Handler is showing dialog to download the ashx file?

I have created a Login.ashx Web Handler to authenticate user by using the following REST Request:

http://192.0.0.0/Pages/LoginPage.ashx?Username=anonymous&Password=123

when I wanted to test my handler, I opened a browser and pasted the link, dialog asked me if I want to save this file of ".ashx",

Any Guide or help would be greatly appreciated.

All was my fault in the response content type I was doing the following:

was:

context.Response.ContentType = "text/text";

now:

context.Response.ContentType = "text/xml";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM