拒绝访问路径"C:\ Sites \ content \ ServerIpAddress.txt" [英] Access to the path 'C:\Sites\content\ServerIpAddress.txt' is denied

查看:53
本文介绍了拒绝访问路径"C:\ Sites \ content \ ServerIpAddress.txt"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个网站,该网站在其默认"网页中尝试访问服务器上的ServerIpAddress.txt文件.现在,当我在本地主机上运行我的项目时,它可以正常工作,但是当我将其上传到Server(免费主机)上时,我会遇到

I create a web site that in Default web page of it i try to access to ServerIpAddress.txt file that is on server . now when i run my project on local host it work correctly , but when I upload it on Server(free host) i face with

错误.有人可以帮我吗?

error. can some one help me ?

推荐答案

由于安全问题,您很可能没有权限访问共享服务器上的文件.考虑将数据从该文件移至web.config应用程序密钥.

You most likely do not have permissions access files on the shared server due to security issues. Consider moving data from that file to web.config app key.

或访问该文件作为您站点的相对路径.远程服务器很可能不会与本地计算机具有相同的文件夹结构.

or access the file as a relative path to your site. The remote sever will most likely not have the same folder structure as your local machine.

这篇关于拒绝访问路径"C:\ Sites \ content \ ServerIpAddress.txt"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆