[英]Relative path in web service for deployment
My web service hosted on IIS cannot find a file in the same directory as the published bin folder(on localhost).我在 IIS 上托管的 web 服务找不到与发布的 bin 文件夹(在本地主机上)相同的目录中的文件。 It appears it is looking elsewhere for the file.它似乎正在别处寻找该文件。 How can I make it find the file using relative path so that it will work if I deploy to any web server.我怎样才能让它找到使用相对路径的文件,以便它在我部署到任何 web 服务器时都能正常工作。
Server Error in '/' Application.
Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\DataStore.xml'.
try HostingEnvironment.ApplicationPhysicalPath or Environment.CurrentDirectory or AppDomain.CurrentDomain.BaseDirectory尝试HostingEnvironment.ApplicationPhysicalPath或 Environment.CurrentDirectory 或 AppDomain.CurrentDomain.BaseDirectory
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.