在服务器中部署应用程序后,图像不会显示,也无法导入Excel文件 [英] Images are not displayed and couldn't import excel files after application deployment in server

查看:55
本文介绍了在服务器中部署应用程序后,图像不会显示,也无法导入Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站在本地工作正常。但是当我在服务器中部署时,我遇到了以下问题:

My site is working fine in local. But when I deployed in server I am getting following issues:

1。图像也未显示

2。在尝试导入excel文件时,它说它无法读取文件。

2. While trying to import an excel file, it is saying that its unable to read the file.

谢谢。

推荐答案

可能您没有正确使用相对路径。在HTML元素和CSS中显示有关图像用法的一些详细信息。有时问题会受到路径之间差异的影响,例如"/Images/MyImage1.bmp","Images / MyImage1.bmp"
和"../Images/MyImage1.bmp\".

对于Excel文件,通常函数 Server.MapPath("〜/ MyFiles / File1.xlsx"),或其他类似的函数可以是用于在加载本地文件之前确定正确的绝对路径。另一个解决方案:在配置文件中指定绝对
路径,在部署后手动调整。

In case of Excel file, usually the function Server.MapPath("~/MyFiles/File1.xlsx"), or other similar, can be used to determine the correct absolute path of the local file before loading it. Another solution: specify the absolute path in the configuration file, which is adjusted manually after deployment.

另请参阅以下资源: https://forums.asp.net

如果它不是Web应用程序,请提供详细信息。


这篇关于在服务器中部署应用程序后,图像不会显示,也无法导入Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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