Displaying the Contents of a Mapped Drive

Apr 20, 2009 at 11:33 AM
Hi Joe, thanks for the effort on this web part. I would like to be able to display the contents of a mapped drive ie (\\server\folder\) in the CPVWP. So I have a list of mapped drives and I would like the user to be able to select an opttion from the list which will then display the contents of that folder in the CPCWP.

Is this possible with your web part.

Thanks and regards
Gary
Coordinator
Apr 20, 2009 at 2:10 PM
Gary,

I tried it and it seems to work OK.

If your list has the full path name of the network share, you should be able to specify {fieldname} as the URL field in the CPVWP (where "fieldname" is the name of the field in the list that has the path - you could also use the position such as {1}) and connect the list view web part to the CPVWP.

The path will need to be a UNC path name (\\server\share\folder), not a drive letter.

Is it not working for you?
Apr 20, 2009 at 2:50 PM

Hi Joe, thanks for replying.

So, if I have a web part page with a List web part and your CPVWP web part on it. I would like to add multiple items to the List web part.

The List web part has 2 fields: “Drive Name” and “Mapping” eg Drive Name = D: and Mapping = \\server\folder

In the web part properties for your CPVWP I have specified {Mapping} in the URL field. (I also tried using the position ie {1} I have also connected the 2 parts. The share exists and I can browse to it.

I have attached a few screenshot or the error I get when I try and view. “IE cannot display the web page”

Thanks very much for your assistance.

Regards

Gary

From: JoeD [mailto:notifications@codeplex.com]
Sent: 20 April 2009 04:10 PM
To: Gary Finberg
Subject: Re: Displaying the Contents of a Mapped Drive [ConnectablePgViewer:53844]

From: JoeD

Gary,

I tried it and it seems to work OK.

If your list has the full path name of the network share, you should be able to specify {fieldname} as the URL field in the CPVWP (where "fieldname" is the name of the field in the list that has the path - you could also use the position such as {1}) and connect the list view web part to the CPVWP.

The path will need to be a UNC path name (\\server\share\folder), not a drive letter.

Is it not working for you?

Read the full discussion online.

To add a post to this discussion, reply to this email (ConnectablePgViewer@discussions.codeplex.com)

To start a new discussion for this project, email ConnectablePgViewer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Apr 20, 2009 at 3:05 PM

Hi Joe, please ignore my previous mail. I did an IISRESET and I can view the contents now ... It works well!

A question: If I have a folder structure, and I drill down into a subfolder, how can I get back up a level? Also how can I enable the “Save As” option ie if I want to save a file from the folder to my local drive?

Thanks

Gary

From: JoeD [mailto:notifications@codeplex.com]
Sent: 20 April 2009 04:10 PM
To: Gary Finberg
Subject: Re: Displaying the Contents of a Mapped Drive [ConnectablePgViewer:53844]

From: JoeD

Gary,

I tried it and it seems to work OK.

If your list has the full path name of the network share, you should be able to specify {fieldname} as the URL field in the CPVWP (where "fieldname" is the name of the field in the list that has the path - you could also use the position such as {1}) and connect the list view web part to the CPVWP.

The path will need to be a UNC path name (\\server\share\folder), not a drive letter.

Is it not working for you?

Read the full discussion online.

To add a post to this discussion, reply to this email (ConnectablePgViewer@discussions.codeplex.com)

To start a new discussion for this project, email ConnectablePgViewer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Apr 20, 2009 at 3:22 PM
To get back one level, use the back button in the browser.  (It took me a bit to figure that out - not obvious.)

As for a Save As option - I don't know.  Remember, the CPVWP is not actually displaying that folder.  It is simply creating a HTML <iframe> tag with the "src" attribute set to your share/folder name (passed in via the connection).

The rendering of the share/folder is being done by Internet Explorer on the client, not the web part on the server.    It is essentially generating:

<iframe src="\\server\share\folder"></iframe>

I suppose IE sees that this is not a web address and renders it as an Explorer-like interface.

If you use the out-of-the-box Page Viewer web part and set it to a static folder name (since it does not accept connections), does it allow Save As?  The out-of-the-box Page Viewer web part allows you to specify whether you are viewing a folder or a web page, but I am not sure why it cares.  If Save As works in that web part, then it may be generating some different HTML and I can try to see what it does differently.
Apr 20, 2009 at 3:28 PM

Thanks Joe, the Back Button option works. Didn’t think of it.

 What security is applied to the contents of the folder?

Thanks

Gary

From: JoeD [mailto:notifications@codeplex.com]
Sent: 20 April 2009 05:23 PM
To: Gary Finberg
Subject: Re: Displaying the Contents of a Mapped Drive [ConnectablePgViewer:53844]

From: JoeD

To get back one level, use the back button in the browser. (It took me a bit to figure that out - not obvious.)

As for a Save As option - I don't know. Remember, the CPVWP is not actually displaying that folder. It is simply creating a HTML <iframe> tag with the "src" attribute set to your share/folder name (passed in via the connection).

The rendering of the share/folder is being done by Internet Explorer on the client, not the web part on the server. It is essentially generating:

<iframe src="\\server\share\folder"></iframe>

I suppose IE sees that this is not a web address and renders it as an Explorer-like interface.

If you use the out-of-the-box Page Viewer web part and set it to a static folder name (since it does not accept connections), does it allow Save As? The out-of-the-box Page Viewer web part allows you to specify whether you are viewing a folder or a web page, but I am not sure why it cares. If Save As works in that web part, then it may be generating some different HTML and I can try to see what it does differently.

Read the full discussion online.

To add a post to this discussion, reply to this email (ConnectablePgViewer@discussions.codeplex.com)

To start a new discussion for this project, email ConnectablePgViewer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Apr 20, 2009 at 3:42 PM

Hey Joe, last question:

If I enable the “Show Page URL” option, is there a way to format it aesthetically? Also is there a way to change the “URL: “ prefix to say something else?

Thanks

Gary

From: JoeD [mailto:notifications@codeplex.com]
Sent: 20 April 2009 05:23 PM
To: Gary Finberg
Subject: Re: Displaying the Contents of a Mapped Drive [ConnectablePgViewer:53844]

From: JoeD

To get back one level, use the back button in the browser. (It took me a bit to figure that out - not obvious.)

As for a Save As option - I don't know. Remember, the CPVWP is not actually displaying that folder. It is simply creating a HTML <iframe> tag with the "src" attribute set to your share/folder name (passed in via the connection).

The rendering of the share/folder is being done by Internet Explorer on the client, not the web part on the server. It is essentially generating:

<iframe src="\\server\share\folder"></iframe>

I suppose IE sees that this is not a web address and renders it as an Explorer-like interface.

If you use the out-of-the-box Page Viewer web part and set it to a static folder name (since it does not accept connections), does it allow Save As? The out-of-the-box Page Viewer web part allows you to specify whether you are viewing a folder or a web page, but I am not sure why it cares. If Save As works in that web part, then it may be generating some different HTML and I can try to see what it does differently.

Read the full discussion online.

To add a post to this discussion, reply to this email (ConnectablePgViewer@discussions.codeplex.com)

To start a new discussion for this project, email ConnectablePgViewer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Apr 20, 2009 at 3:44 PM
Just a guess, but I think it would be accessed in the same security context of the user viewing it.

Remember, it is not viewing the folder via the server.  It is just generating an iframe tag and Internet Explorer on the client renders it in the browser.  So the files will be accessed as the currently logged in user.

Security could also be controlled by the settings in IE, assuming that in the Local Intranet zone you have "Include all network paths (UNCs)" checked (Tools->Internet Options, Security tab, Local Intranet zone, Sites button).

Coordinator
Apr 20, 2009 at 3:46 PM
No, not at this time.

It is mainly there as a debugging tool (to see what is being passed by the connection and substituted in).  It doesn't always display correctly depending on what else goes on in the iframe from the page being displayed.
Apr 20, 2009 at 3:47 PM

Ok, thanks for all your help on this.

Regards

Gary

From: JoeD [mailto:notifications@codeplex.com]
Sent: 20 April 2009 05:47 PM
To: Gary Finberg
Subject: Re: Displaying the Contents of a Mapped Drive [ConnectablePgViewer:53844]

From: JoeD

No, not at this time.

It is mainly there as a debugging tool (to see what is being passed by the connection and substituted in). It doesn't always display correctly depending on what else goes on in the iframe from the page being displayed.

Read the full discussion online.

To add a post to this discussion, reply to this email (ConnectablePgViewer@discussions.codeplex.com)

To start a new discussion for this project, email ConnectablePgViewer@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com