设置elFinder对虚拟主机的正确路径(IIS 7+) [英] Setup the Correct Path of elFinder for Web Hosting (IIS 7+)

查看:686
本文介绍了设置elFinder对虚拟主机的正确路径(IIS 7+)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 elFiner 在我的项目(​​有elFinder连接器)和本地主机上的伟大工程。

但是,当我把它部署到服务器(在线托管),它给了我一个错误目标目录未找到或拒绝访问。这里是我的配置;

i have used elFiner in my project (with elFinder Connector) and works great on localhost.
But when i deploy it to the server (online hosting), It gives me an error target dir not found or access denied. here is my configuration;

  <elFinder apiVersion="2.0"
            localFSRootDirectoryPath="D:\Projects\Emaar\Emaar.Web\Areas\EmaarAdmin\Content\images"
            localFSThumbsDirectoryPath="D:\Projects\Emaar\Emaar.Web\Areas\EmaarAdmin\Content\images\.thumbs"
            rootDirectoryName="Root"
            uploadMaxSize="20M"
            defaultVolumeName="LocalFileSystem"
            baseUrl="http://localhost:4595/Areas/EmaarAdmin/Content/images/"
            baseThumbsUrl="http://localhost:4595/Areas/EmaarAdmin/Content/images/.thumbs/"  
            duplicateFilePattern="Copy of {0}"
            duplicateDirectoryPattern="Copy of {0}"
            thumbsSize="48,48">
  </elFinder>

我相信我的路径是不正确的在我的web.config。

如何设置了 elFinder 也联机工作(在Web上)?

更新:我在网上设置看起来像这样;

I believe my path aren't correct in my web.config.
How do i setup the elFinder to work also online (on the web)?
UPDATE: my online settings looks like this;

    <elFinder apiVersion="2.0" localFSRootDirectoryPath="\Areas\EmaarAdmin\Content"
localFSThumbsDirectoryPath="\Areas\EmaarAdmin\Content\.thumbs" 
rootDirectoryName="Root Main" uploadMaxSize="20M" defaultVolumeName="LocalFileSystem" 
baseUrl="http://subdomain.domain.com/Areas/EmaarAdmin/Content/"
baseThumbsUrl="http://subdomain.domain.com/Areas/EmaarAdmin/Content/.thumbs/"
duplicateFilePattern="Copy of {0}" duplicateDirectoryPattern="Copy of {0}" thumbsSize="48,48">

我还设置权限

推荐答案

我做一个简单的一招解决了这个问题。首先我写了下面的code,并把它的 _layout (剃刀)文件中。

i solved the problem by doing a simple trick. First i have wrote the following code and put it inside the _Layout (razor) file.

@HttpContext.Current.Request.PhysicalApplicationPath

这给了我一个物理路径,然后我刚才复制并粘贴在 localFSRootDirectoryPath localFSThumbsDirectoryPath 和它的工作

This gave me a physical path and then i just copied it and paste it inside the localFSRootDirectoryPath and localFSThumbsDirectoryPath and it did work

这篇关于设置elFinder对虚拟主机的正确路径(IIS 7+)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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