kamagra how much to take

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:

  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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>