开发者

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

开发者 https://www.devze.com 2023-02-17 18:50 出处:网络
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

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";
0

精彩评论

暂无评论...
验证码 换一张
取 消