SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs




ITaCS GmbH


Major Update to the Fileserveraccess Web Part  

Jan 122012

In 2008 I’ve released a Web Part, which enables your users to access files on your fileservers through SharePoint. Original post. This Web Part has been downloaded many times. With this new version, I’ve tried to deal with the most asked questions (like Kerberos), which will make the Web Part easier to use. Naturally new features have been implemented, to get you to upgrade to the new version.

With this release, the Web Part requires SharePoint Foundation / Server 2010. For the users who are still using WSS V3, please stick to the old version, or upgrade your farm Smile

First some screenshots, so you know what I am talking about.

image

image image

Features

  • Download files from your fileservers via SharePoint
  • Download a folder with all containing files as zip-file
  • Upload files to a fileserver
  • Delete files from a fileserver
  • View the file properties
  • By default, the fileserver path has to be UNC. Local paths are not allowed, so a user cannot enter C:\ to access e.g. the web.config or other files on the local server
  • Multilanguage

Of coarse the access to the files is security trimmed. Meaning that if your users would not be able to access files with their logon from their client, they won’t be able from the Web Part!

Requirements

For authorization against the fileserver, the credentials of the currently logged on user is used. For SharePoint (and any other application as well), it is necessary to configure the WebApplication which is hosting the Web Part to use Kerberos instead of NTLM. Otherwise a server cannot pass the user credentials forward to a second server. This is called the “Double-Hop problem”. To get a glimpse about the topic, take a look at an article I wrote some time ago. Configuring Kerberos for SharePoint. That post has been written for SharePoint V3! But thereimage are plenty of Kerberos Guides out there for SP 2010. And a whitepaper from Microsoft: Configuring Kerberos Authentication for SharePoint 2010 Products http://technet.microsoft.com/en-us/library/ff829837.aspx

If you do not configure Kerberos for the WebApplication, the Web Part will detect that, and show a notification in the properties section.

A small sidenote: If you are going to use local paths (meaning a folder on your SharePoint server), you can continue using NTLM. 

Another good starting point for Kerberos-Troubleshooting can be found here: http://blogs.msdn.com/b/friis/archive/2009/12/31/things-to-check-when-kerberos-authentication-fails-using-iis-ie.aspx

Configuration

image

To use the WebPart, you’ll need to at least configure a path. Files – and subfolders – from that path will be shown.

Additionally, there are some properties, which modify features of the Web Part.

The Paging size defines, how many files are displayed on one page. With the next three checkboxes, you can allow files to be downloaded as zip, allow files to be uploaded and to be deleted.

I recommend to leave the caching activated. Deactivate only, if you have specific reasons, because there will be more todo for your SharePoint server and fileserver.

Using a local path as source

In case you want to use a local path as source for the Web Part, you have to allow the path to be used. To do so, follow the steps below.

  1. locate the feature.xml file ("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\FileserverAccess\Feature.xml")
  2. Edit the file in your favorite editor
  3. Look for the property with the key “AllowLocalPaths” and modify the value to correspond to the driveletter you wish to use
    image
    Replace “Driveletter” with e.g. “C”. You can specify more than one drive letters. In that case use a “;” as divider
  4. Save the feature.xml
  5. Restart your IIS (iisreset)

Remember that you’ll need to modify the file on all of your FrontEnd SharePoint Servers! After an upgrade of the Web Part, the file has to be modified again. If you do not allow local drives, the Web Part will show an error.

image

This version is compatible to the old version. So you can simply upgrade the solution and benefit of the new features!

Download the new version for SharePoint 2010 (Foundation and Server): RH.FileserverAccess.wsp

Download the old version for WSS V3 / MOSS 2007: RH.FileserverAccess.wsp

Update March 2012

  • I did not get the Web Part working in my claims based authentication test-environment. Additionally, the Web Part properties will show the current user and authentication method. If you see Negotiate, your environment is set up correctly (for classic authentication).

imageimage

  • Another small update, which prevented the upload from working in Chrome
 
Posted by René Hézser | 34  Comments | Trackback Url  | 0  Links to this post | Bookmark this post with:        
Tags: Development, Fileserver Access, SharePoint, Webparts
Technorati Tags: , , ,

Links to this post

Comments

commented on  Wednesday, January 18, 2012  8:43 AM  by  Claus Czygan
Guten Morgen,
ich bin schon lange, wie wahrscheinlich viele, auf der Suche nach einem solchen Webpart. Vielen Dank dafür. Ich habe es in unserer 2010 Team Foundation eingebaut, bekomme den Inhalt der Verzeichnisse eines entfernten Filservers angezeigt, erhalte allerdings beim Versuch, eine Datei herunterzuladen, folgenden Fahler:

Error fetching the file for Download:
Unable to find the specified file.

Die gleiche fehlermeldung erhate ich, wnn ich einen lokalen Share benutze.
Die Eigeschaften der Dateien in den eingebundenen Shares werden mir einwandfrei angezeigt.

Füe eine Hilfestellung wäre ich sehr verbunden. Ich möchte das Webpart gerne für Downloads von Skripten für Studenten einsetzen.

Viele Grüße
Claus Czygan





commented on  Wednesday, January 18, 2012  8:53 PM  by  René
Moin Claus,
ich habe dir eine E-Mail geschrieben.

Gruß
René

commented on  Thursday, January 19, 2012  3:27 AM  by  Shawn
Thanks for the webpart Rene!
but this Web Pare only works on my install Server
what i use is Sharepoint 2010 SP1 windows 2008 R2
but it will show "speical path no " on my other machine....what else do I have to do?

commented on  Thursday, January 19, 2012  3:45 AM  by  Shawn
by the way what i use on server is windows authorized .

commented on  Thursday, January 19, 2012  8:10 PM  by  René
Hi Shawn,
is the Webpart working, or is it not working. I can't figure from your comment.
Have you configured a path in the Webpart properties? Is it a local path (on the SharePoint box), or a remote path starting with "\\"?
René

commented on  Friday, January 20, 2012  5:40 PM  by  Dennis
Hallo René,
das Einbinden und konfigurieren der Solution klappt soweit gut. Bei uns ist die Situation so, dass wir gerne über Sharepoint auf einen Samba-Fileserver zugreifen möchten, der nur lokal in der Domäne verfügbar ist (Firewall). Binde ich dein Webpart ein und gebe den Remote-Pfad für den Server an, so funktioniert das ganze, wenn ich die Seite im Domänen-Netzwerk aufrufe. Auf einem externen Computer wird ein Fehler ausgegeben (Kann Zielverzeichnis nicht finden (oder so ähnlich, müsste ich nochmal genau schauen)).

Ist dieses Verhalten gewollt?

Vielen Dank für dein super Plugin und viele Grüße
Dennis

commented on  Saturday, January 21, 2012  10:04 AM  by  SharePoint Experts India blog
I am vary interested in your post and that is very helpful and useful for me. I like it very much and that is more shareable. Thanks for share it with us.

commented on  Saturday, January 21, 2012  3:29 PM  by  René Hézser
Hi Dennis,
von extern wird der Aufruf wohl nicht mit Kerberos Authentifizierung am SharePoint auflaufen. Wer führt die Authentifizierung von Extern durch? Eine Firewall/Reverseproxy?

Gruß
René

commented on  Sunday, January 22, 2012  1:24 PM  by  Peter Klemm
Hi

Can you advise if it is possible to include a server variable in the file share path, for example to point to the home directory of the logged on user?

Cheers, Peter

commented on  Monday, January 23, 2012  1:04 PM  by  LucaS
Hi,
i've installed your web part, but i receive only the message: The specified Path does not exist! even if I'm sure of the the UNC path that i try(\\itmifs01\test). I need to do something particular ?
Thanks

commented on  Wednesday, January 25, 2012  6:17 PM  by  Damian
Hi René: this versión multilanguage include spanish? Thanks

commented on  Wednesday, January 25, 2012  8:35 PM  by  René
Hi Peter,
that's an interesting point. I've put it on my TODO list :-)

René

commented on  Wednesday, January 25, 2012  8:36 PM  by  René
Hi Damian,
I've not translated it to Spanish, because I can't speak it. Do you want to do the translation? Just drop me an E-Mail if you like to.

René

commented on  Thursday, January 26, 2012  4:44 PM  by  Marc
Hallo René,

ich hab das Webpart mal bei uns eingebunden. Hat auch alles geklappt. Wenn ich nun allerdings den UNC Pfad eintrage, erhalte ich immer die Meldung das es den Pfad nicht gibt.... Hast du da vielleicht eine Idee?

gruß

commented on  Friday, January 27, 2012  2:45 AM  by  Mike Acord
Is the source code available?

commented on  Friday, January 27, 2012  5:35 PM  by  Justin
René,

Your web part is wonderful and works well when using it from a computer within my domain. However, when I access my sharepoint site from outside the domain using the external DNS name, the web part shows "The specified Path does not exist!". I suppose this makes sense since the specified UNC path would not be available publicly, but I was hoping that since the web part is located on the server that it would be able to resolve the path and allow for use outside the network. Is this possible? Are there other changes I need to make?

commented on  Sunday, January 29, 2012  12:05 PM  by  Dario Züger
Hallo

Genau nach diesem Tool suche ich schon praktisch ewigs. Ich konnte die Lösung bei uns zwar hochladen, kriege dann aber bei der Aktivierung eine Fehlermeldung, dass die Lösung ungültiges Markup oder Elemente enthält, die nicht als Sandbox-Lösung bereitgestellt werden können.

In der Datei manifest.xml ist dass DeploymentTarget-Attribut (WebApplication) ungültig. Enumeration-Einschränkung ist fehlgeschlagen.

Kann mir da jemand weiterhelfen?

Vielen Dank.

commented on  Wednesday, February 01, 2012  12:59 PM  by  simon
Hi Rene,

I too am having a problem with "The specified path does not exist!". I have confirmed that SP10 is working with kerberos and that the unc path is correct. Anything I can do to troubleshoot would be appreciated.

Many thanks

Simon

commented on  Wednesday, February 01, 2012  9:32 PM  by  Jake
I to have the similar issue other users have. I enter in my server path and share \\servername\share and it attempts to search for the file then eventually states file path does not exist.

The path exists and Kerberos is on. Anything else we can try?

commented on  Thursday, February 16, 2012  1:00 PM  by  Pradeep
Hi Rene,
Will list the problems I'm facing now:
1). I'm getting the below error when I gave the path.(Kerberos Authentication)
"Error generating object from path '\\jmsads\share': System.ArgumentException: The UNC path should be of the form \\server\share. at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck) at System.IO.DirectoryInfo..ctor(String path) at RH.FileServerData..ctor(String path, Boolean getSubDirectories)"

2)Below is the issue when I gave the path.(NTLM)
i) Javascript error(Whenever I click refresh icon)
ii) Folder structure is correctly displayed, but When I tried download or delete I get the error:
"Error fetching the file for Download:Unable to find the specified file."

Thank you,
PradeepKumar


commented on  Thursday, February 16, 2012  8:47 PM  by  Jay Mueller
Very cool and nice job on the dev work. It would be cool if you could change the views for example from details to thumbs.

Great work none the less!

commented on  Wednesday, February 22, 2012  2:36 PM  by  Jay
How do you get the upload function to work? Everything works except for that. When I click Upload nothing happens. I've tried external and internal access with no luck. Any guidance would be greatly appreciated.

commented on  Wednesday, February 22, 2012  4:54 PM  by  Jay
How do you get the upload function to work? Everything works except for that. When I click Upload nothing happens. I've tried external and internal access with no luck. Any guidance would be greatly appreciated.

commented on  Thursday, March 01, 2012  6:06 AM  by  Mat
Hi Rene,
I am getting the error "Object reference not set to an instance of an object" after putting in the fileservers path.
How do i fix this?
THanks

commented on  Friday, March 09, 2012  8:27 PM  by  Mike Slo
Hi Rene -
Thanks for all the great work and resources you provide. I tried using the RH.fileserveraccess.wsp and I am having a bit of trouble I was hoping to get your help with. I added and deployed the solution, now when I go to use the web part and put it on a site, I get the following error "The file you imported is not valid. Verify that the file is a web part description file (*.webpart or *.dwp) and that it contains well-formed XML." . I did not get any error adding or deploying the solution, nor have I made any edits or changes at all. Any help is greatly appreciated, again, thank you for everything.

Mike Slo.

commented on  Wednesday, April 04, 2012  8:55 PM  by  Ernie
I have downloaded and installed your webpart, the old verson for WWS 3. and the install was nice and smoth. the problem that I'm running into is, I keep getting an error when I try and point it to my file server. I ever added a mapped drive to my sharepoint server and pointed the webpart to it and it comes back that, the path dows not exist. Is there a way to get some help with this problem please.
Thanks
Ernie

commented on  Tuesday, April 17, 2012  1:59 PM  by  mark
Super Webpart - einwandfrei funktioniert!
Ist es möglich, statt das File über den FileserverAccessHandler herunterzuladen, direkt den "Fileshare"-Link anzugeben? Der User sollte darauf ja Zugriff haben.
Danke!

commented on  Thursday, April 19, 2012  12:52 PM  by  Eric Winter
René, thank you for your valued webpart.


commented on  Tuesday, April 24, 2012  6:58 AM  by  Gill
Hi Rene ,
Im having the same problem than fews guys here . When I type my server path \\fsserver\share and try to apply , Im getting the error :
The specified Path does not exist!
The network name cannot be found.
But , if I access the sharepoint from the sharepoint server , I have not problem in access the file system share . Keberous is working ok , the machines are all in the same domain .
Any idea how to fix that ?
Cheers Mate


commented on  Tuesday, April 24, 2012  2:54 PM  by  Pradeep
Hi Rene

I have the same question as Peter about pointing to the home directory of the logged on user. Just wondering if you have been able to do anything for this?

commented on  Friday, May 04, 2012  2:46 AM  by  David
Hi Rene I have all setup correctly but when I type in a network path and click on apply I get the following error:
System.NullReferenceException: Object reference not set to an instance of an object. at RH.FileserverAccess.<>c__DisplayClass30.b__2d() at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.b__2() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at RH.FileserverAccess.VerifyKerberosIsEnabled() at RH.CustomToolPart.ApplyChanges()

thanks for your assistance

commented on  Tuesday, May 08, 2012  3:01 PM  by  Matt Gudites
Any luck on getting this to work with Claims Based? Also when I click on "Check for updates" it says there's a 2.2.4.0 available, but I can't seem to locate it.

commented on  Tuesday, May 15, 2012  5:37 PM  by  Stephan
Hallo René,

Tolles Webpart..
Leider habe ich daselbe Problem wie manch einer meiner Kollegen hier.
Ich bekomme die Dateien nur angezeigt, wenn ich vom Lokalen Sharepoint Server darauf zugreife.
Beim Aufruf vom Client bekomme ich die Meldung `Pfad nicht gefunden`.
Den Share habe ich als UNC Notation \\Server\Freigabe eingetragen.
Eine Idee woran das liegen kann ?

commented on  Thursday, May 17, 2012  5:52 PM  by  Pinchii
Hi,

If you have a language file, i can help translate it to spanish

Also, i'd be interested in looking at the source as well..

I changed around the icons you used for the upload / zip and download / delete buttons since they are all different sizes, look nice when they are all 16x16

another appearance issue, no space between upload.png and the text "Upload File"

Name *:
URL:
Email:
Kommentar:


CAPTCHA Image Validation