• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Linking with Mapped Network Drives

Engaged ,
Mar 24, 2009 Mar 24, 2009

Copy link to clipboard

Copied

CF has permission to access a mapped drive, and I can use cfdirectory to list all the files in the folders I want, but why I try to link to them, CF says it cannot find the file. When I try to go to just the mapped drive in an IE window, I have to put in a username/password, but cfdirectory doesn't have those kinds of attributes. My sysadmin suggests that I upload the necessary files to the CF server, which I can do with cffile action="copy", but I'd prefer to keep everything on the mapped drive.

Any suggestions? Thanks!
TOPICS
Advanced techniques

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 25, 2009 Mar 25, 2009
kodemonki wrote:
> I can read the directory (show a list of files, etc) with cfdirectory just
> fine, but I am trying to use an anchor, much like this:
> <a href="\\myserver.mydomain.com\public\Public_Users\kate\#name# where #name#
> is the file returned from cfdirectory.
>

How does the file returned from the <cfdirectory...> tag relate to the
web root directory of \\myserver.mydomain.com\?

I suspect you may need some type of mapping|virtual directory|symbolic
link here depending on what...

Votes

Translate

Translate
Advisor ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

Try using the UNC path instead of a mapped drive.

See this article:
http://www.adobe.com/go/9616b854

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

Is your CF application server service running under a windows domain account?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

I am using the UNC path. I've also tried the IP address.
And yes, my CF app server service is running under a windows domain account.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

kodemonki wrote:
> I am using the UNC path. I've also tried the IP address.
> And yes, my CF app server service is running under a windows domain account.

Are you having trouble reading this directory with CFML using
<cfdirectory...> and|or <cffile...> tags *OR* are you trying to create
HTML anchor <a...> links that would require this directory to be
accessible under a web root?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

I can read the directory (show a list of files, etc) with cfdirectory just fine, but I am trying to use an anchor, much like this:
<a href="\\myserver.mydomain.com\public\Public_Users\kate\#name# where #name# is the file returned from cfdirectory.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

kodemonki wrote:
> I can read the directory (show a list of files, etc) with cfdirectory just
> fine, but I am trying to use an anchor, much like this:
> <a href="\\myserver.mydomain.com\public\Public_Users\kate\#name# where #name#
> is the file returned from cfdirectory.
>

How does the file returned from the <cfdirectory...> tag relate to the
web root directory of \\myserver.mydomain.com\?

I suspect you may need some type of mapping|virtual directory|symbolic
link here depending on what flavor of OS and Web Server you are utilizing.

The other issue could be a difference in permissions between the user
ColdFusion runs under which is used to read the directory with
<cfdirectory...> and the user used by the Web Server for client requests.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

As a test, while on the server, map the drive in question....say, as the G:\ drive. Then try your CFM page again, using the G:\foldername\filename approach.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

LATEST
Virtual directories worked perfectly, thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation