部署我的网站后,无法打开记事本或Pdf文件(使用线程).

编程入门 行业动态 更新时间:2024-10-26 16:31:21
本文介绍了部署我的网站后,无法打开记事本或Pdf文件(使用线程).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用线程概念打开记事本或pdf文件.我的本地计算机打开正常,但是在部署记事本窗口后无法工作.. 关于我的问题的任何建议.... 预先Tahnks

I am using Threading concept for open notepad or pdf file. My local machine opened well ,but after deploy notepad window didnt work.. any suggestions about my problem.... Tahnks in advance

推荐答案

您的意思是,当您在本地计算机上进行测试但部署站点时,代码背后的代码可以打开记事本或PDF文件吗?到远程Web服务器,您将不再看到记事本或PDF查看器? 如果是这样,那么我并不感到惊讶. 想必您正在使用Process.Start打开文件吗? 这将打开服务器上的文件:而不是用户计算机上的文件. (并且可能会惹恼Web服务器管理员.) 您无法在服务器上的用户计算机上运行程序:这被称为可能是病毒活动",并且已被正确阻止. Do you mean that your code behind code opened Notepad or a PDF file okay when you were testing on your local machine, but when you deploy the site to a remote webserver you no longer see Notepad or the PDF viewer? If so, then I am not surprised. Presumably, you are using Process.Start to open the file? That will open the file on the server: not the user machine. (and probably annoy the heck out of teh webserver admin.) You cannot run programs on a user machine from the server: that is called "probably virus activity" and rightly blocked.

确保这些文件的路径正确.使用相对URL. Make sure the paths to these files are correct. Use relative URLS.

更多推荐

部署我的网站后,无法打开记事本或Pdf文件(使用线程).

本文发布于:2023-11-11 11:05:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1578250.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:线程   无法打开   记事本   文件   网站

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!