About      |       Articles      |      Services      |      Software      |      Contact

Latest Free SharePoint Software

ARB Security Solutions regularly releases free SharePoint software, including WebParts, Client Applications, Framework Extensions, and other Miscellaneous Components.
The most recent freeware is:

Title: Simple SharePoint Rollup WebPart
Date Published: 10/22/2009

Previous Two Free WebPart Releases:

SecureCenter For SharePoint

By SharePoint security integrators, for SharePoint security integrators.

SharePoint Security Assurance Program™

For externally facing SharePoint deployments, security is an acutely important deployment concern. Learn how through daily security scanning, you can ensure external business users and partners that they can collaborate in confidence!

Security Assurance WebPart:



Returing Virtual Directory Path From Web Application

If you consume a SPWebApplication object as a parameter, you can return the virtual directory path by using the GetIisSettingsWithFallback() method to return the settings for a specified SharePoint zone.

Here is a static method that demonstrates how to do it:

C#:
  1. public static string GetVirtualDirectoryPath(SPWebApplication webApp)
  2. {
  3. string path = string.Empty;
  4. try
  5. {
  6. if (webApp != null)
  7. {
  8. path = webApp.GetIisSettingsWithFallback(SPUrlZone.Default).Path.ToString();
  9. }
  10. }
  11. catch (Exception exception)
  12. {
  13.  
  14. }
  15. return path;
  16. }

  • Share/Bookmark

1 Comment »

  1. Thanks alot!

    I have been looking for this for a few days. This has shortened my code totally.

    Is there a way to obtain the Virtual Directory Path of an extended SharePoint web application ?

    Thanks alot again,
    Bobby.

    Comment by Bobby — March 3, 2010 @ 4:23 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment