context.Server.MapPath()出现两个网站名
来源:互联网 发布:微软办公软件mac版 编辑:程序博客网 时间:2024/06/05 11:03
一.问题:
使用context.Server.MapPath("Config/ExcelConfig.xml")获得ExcelConfig.xml文件的绝对路径时,返回的路径中出现了另个网站名。
例如:D:\总部MES\报表框架\HQAPP_RT\ReportWeb\ReportWeb\Config\ExcelConfig.xml
ExcelConfig.xml文件的虚拟路径为:ReportWeb\Config\ExcelConfig.xml.
ReportWeb为网站名
二.解决办法:
context.Server.MapPath("/Config/ExcelConfig.xml")
返回结果为:
D:\总部MES\报表框架\HQAPP_RT\ReportWeb\Config\ExcelConfig.xml 0 0
- context.Server.MapPath()出现两个网站名
- Server.MapPath()
- Server.MapPath
- Server.MapPath
- Server.MapPath()
- Server.MapPath()
- Server.MapPath
- Server.MapPath(".") Server.MapPath("./") Server.MapPath("/") Server.MapPath用法详解
- server .mappath
- SERVER.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- Server.MapPath()
- BNU17268 UVA129 Krypton Factor
- 第9周项目3 -稀疏矩阵的三元组表示的实现及应用(1)
- android.content.res.Resources$NotFoundException
- 锁表 存储过程 JOB简介
- Cocos 3.0 第一天
- context.Server.MapPath()出现两个网站名
- [codeforces722E] Research Rover
- 计算无向连通图的割点和割边
- nginx gzip开启
- 执行shell脚本报错#!/bin/ksh: No such file or directory
- android actionbar再见
- 解决没在写保护情况下adb中一直卸载不了app的问题
- Protobuf语言指南
- A 'Brief' History of Neural Nets and Deep Learning, Part 1