开发者

downloading not working for ipaddress while works fine for localhost

开发者 https://www.devze.com 2023-01-02 17:58 出处:网络
I had code on Download.aspx for downloading different type of file like doc, xls, pdf etc. I usually call the page to download a file. In one of my instance i am call开发者_StackOverflow社区ing this f

I had code on Download.aspx for downloading different type of file like doc, xls, pdf etc. I usually call the page to download a file. In one of my instance i am call开发者_StackOverflow社区ing this from a java script code which works fine for http://loaclhost/tp/howwuworks/howwuworks.aspx but if i put ipaddress instead of localhost then its not working.


Maybe you don't have public ip. However, if you can see your page by ip, it is not the issue.


The problem is not with the code but its with the IE security settings. The solution for this is to enable the File download promping in IE security settings.

Goto Tools -> Internet Options -> Security Tab ->

Click on Custom Level Button ->

Under Downloads section enable "Automatic prompting for file downloads"

0

精彩评论

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

关注公众号