Major Update to the Fileserveraccess Web Part
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 🙂
First some screenshots, so you know what I am talking about.
![]() | ![]() |
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 there 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
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.
- locate the feature.xml file ("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\FileserverAccess\Feature.xml")
- Edit the file in your favorite editor
- Look for the property with the key “AllowLocalPaths” and modify the value to correspond to the driveletter you wish to use
Replace “Driveletter” with e.g. “C”. You can specify more than one drive letters. In that case use a “;” as divider - Save the feature.xml
- 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.
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).
- Another small update, which prevented the upload from working in Chrome
54 Comments
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
René
Moin Claus,
ich habe dir eine E-Mail geschrieben.
Gruß
René
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?
Shawn
by the way what i use on server is windows authorized .
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é
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
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.
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é
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
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(\itmifs01test). I need to do something particular ?
Thanks
Damian
Hi René: this versión multilanguage include spanish? Thanks
René
Hi Peter,
that’s an interesting point. I’ve put it on my TODO list 🙂
René
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é
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ß
Mike Acord
Is the source code available?
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?
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.
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
Jake
I to have the similar issue other users have. I enter in my server path and share \servernameshare 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?
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 ‘\jmsadsshare’: System.ArgumentException: The UNC path should be of the form \servershare. 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
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!
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.
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.
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
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.
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
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!
Eric Winter
René, thank you for your valued webpart.
Gill
Hi Rene ,
Im having the same problem than fews guys here . When I type my server path \fsservershare 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
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?
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
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.
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 \ServerFreigabe eingetragen.
Eine Idee woran das liegen kann ?
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 16×16
another appearance issue, no space between upload.png and the text “Upload File”
admbyr
Has anyone solved the problem…
The specified Path does not exist!
The network name cannot be found.
I’m pointing to a valid share and kerberos is working fine. If I put same unc path into start>run it opens share right up. Please help!
victor
Fileserver Access – Webapplication
This feature modifies the web.config to support the Fileserver Access Webpart
?
Philippe
Bonjour René,
Like many others, i’m stuck with “the network name cannot be found”.
It works if the share is on the sharepoint server, but it doesnt work for shares on my fileserver.
I would love it to work so I would be able to access my files remotely without vpn.
Waiting for your help.
Thanks,
Philippe
Andrew.C
Hi,
I have installed your webpart and change the Authentication Method to Negotiate (Kerberos), but i still can’t access the network drive, it denied me but i have the access right to the folder…..help….
Teudjy
Hi,
I’ve installed the webPart and it’s work. Well, I can access to my files located on a shared folder on the same server than my SharePoint server.
But there is some things that can be change 🙂
I’d like to be able to resize the view to fill the webpart (it’s now size to the minimum size).
I’d like to see folders in the rigth view, with the files, so i can access so the same option than the files.
And to add on this, I have an error when I try to “zip and download”, the error is, whichever the folder i try :
Error generating zip file:
System.IO.IOException: Nom de répertoire non valide.
à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
à System.IO.Path.GetTempFileName()
à FileserverAccessHandler.ZippedDownload(DownloadFileAccess download, HttpContext context)
Any Help ?
Thanks 🙂
Mike
It looks like we have all the same problem. I can only access the files where the sharepoint is installed on. I cant access file on other server or san storage. René can you help us pls? thanks
Eric
Hello. We have been able to implement your web part using Kerberos authentication. Have you been able to make it work using claims based authentication as that is what we are using in our production environment.
Horst Eisele
Hi René,
i’ve installed your solution successfully on SharePoint 2013. Authentificationist NTLM. The webpart is placed on Teamwebsite, giving the following error message:
Error in CreateChildControls: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. (Fehlerdetail ist gleich Ein ExceptionDetail, vermutlich erstellt durch IncludeExceptionDetailInFaults=TRUE, mit dem Wert: System.UnauthorizedAccessException: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. bei Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity) bei Microsoft.IdentityModel.WindowsTokenService.S4UServiceContract.PerformLogon(Func`1 logonOperation, Int32 pid) bei SyncInvokeUpnLogon(Object , Object[] , Object[] ) bei System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) bei System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)).
Do you have an idea, where i have to search?
Thank’s
Horst
Horst Eisele
Hi René,
i’ve found the solution for this error in article http://online.appdev.com/edge/blogs/doug_ware/archive/2011/04/16/beware-kb979917.aspx
Now i have the last small barrier:
Der Zugriff auf den Pfad “\SRV11SPShare” wurde verweigert.
Which user accesses the unc-path?
Thank’s
Horst
Bernd
Hallo René,
vielen Dank für das wunderbare Webpart, klappt alles einwandfrei. Da wir das Webpart bei uns Abteilungsintern einsetzen wäre es klasse wenn es noch zusätzlich eine Möglichkeit gäbe Dateien auch löschen zu können. Ist diese Möglichkeit vorstellbar?
Danke
Gruß
Bernd
Bernd
Hallo René,
wer lesen kann ist deutlich im Vorteil. 🙂
Schande über mein Haupt – habe die Funktion gefunden.
Danke
Gruß
Bernd
Ernest
Hello Rene,
File access webpart is great! I can use it within local intranet with Kerberos. Now I want to use claims based authentication so I can use it through Internet. However I got this error in the webpart: “Error in CreateChildControls: System.InvalidOperationException: Cannot get UPN for current user. at RH.ImpersonationHelper.DoImpersonation() at RH.ImpersonationHelper..ctor() at RH.ImpersonationHelper.GetAuthenticationInformation(String divider, HttpRequest request) at RH.FileserverAccess.CreateChildControls()” Would you please help?
Thanks,
Ernest
Ron Beugeling
Hello René,
Thanks you for the webpart.
Only thing is that it is not working.
We use also claims and we also get errors.
See errors below.
Token cannot be zero.
Error in UpdateData: System.Exception: Error adding notes to TreeView: System.ArgumentException: Token cannot be zero. at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken) at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated) at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken) at Microsoft.IdentityModel.WindowsTokenService.S4UClient.CallService(Func`2 contractOperation) at RH.ImpersonationHelper.DoImpersonation() at RH.ImpersonationHelper..ctor() at RH.FileServerData.get_Path() at RH.FileserverAccess.FillTreeViewFirstLevel() —> System.ArgumentException: Token cannot be zero. at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken) at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated) at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken) at Microsoft.IdentityModel.WindowsTokenService.S4UClient.CallService(Func`2 contractOperation) at RH.ImpersonationHelper.DoImpersonation() at RH.ImpersonationHelper..ctor() at RH.FileServerData.get_Path() at RH.FileserverAccess.FillTreeViewFirstLevel() — End of inner exception stack trace —
Am I missing something?
Marvin Leitner
Hello Renè,
I have tried to install your Webpart on a SharePoint Foundation 2013. The installation was successfully but I can’t configure it on a claims based webapplication… do you have an Update for this? When I try to configure it on a classic mode webapplication it doesn’t work correctly and shows me only a blank page after saving my changes.
thanks and kind regards
Marvin Leitner
Nick
Hi Rene,
Thanks for a great tools. We have this working perfectly for “internal” users who can authenticate to SharePoint using Kerberos. What I can’t get working is external users at home (like in your description) as they cannot authenticate to SharePoint using Kerberos (that I am aware of?) and hence the webpart cannot access the share?
Do you have any suggestion son how to get round this (or if it is even possible)?
Thanks,
Nick.
Dirk Peter
Hallo,
das Webpart finde ich gut allerdings wie gebe ich eine UNC Pfad richtig ein.
Mein Share wäre \depir-pwdp-f01Public Dann bekomme ich aber foldende Meldung.
Der angegebene Pfad existiert nicht! Der Netzwerkname wurde nicht gefunden.
Eine Anzeige von lokalenen Datenträgern geht.
Wäre froh wenn sie mir helfen könnten, ich bin in Sachen Sharepoint noch am Anfang.
Grüße
René Hézser
Moin Dirk,
ist Kerberos korrekt eingerichtet? Bekommst du eine Fehlermeldung in den WebPart Eigenschaften?
Der WebPart kommt leider nicht mit Kerberos und Claims klar 🙁 Da habe ich keine Lösung finden können.
Gruß
René
Benson
Is it possible to release the source code of File Server Access Web Part?
We would like to build on top of this great tool with something like granular user access rights, etc.
Thanks in advance,
Benson
René Hézser
Hi Benson,
Sry. I have no plans to release the Sourcecode to this solution.
René
sujatha
Can i use File Server Access Web Part in sharepoint 2016?