Changeset 11

Show
Ignore:
Timestamp:
01/07/07 23:47:33 (2 years ago)
Author:
anonymous
Message:

corrected bug when used with a root application path

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk

    • Property svn:ignore changed from
      _ReSharper.SmallSharpTools.UrlMapper
      SmallSharpTools.UrlMapper.resharper.user
      SmallSharpTools.UrlMapper.suo
      SmallSharpTools.UrlMapper-Debug.zip
      SmallSharpTools.UrlMapper-Release.zip
      to
      _ReSharper.SmallSharpTools.UrlMapper
      SmallSharpTools.UrlMapper.resharper.user
      SmallSharpTools.UrlMapper.suo
      SmallSharpTools.UrlMapper-Debug.zip
      SmallSharpTools.UrlMapper-Release.zip
      SmallSharpTools.UrlMapper.resharper
  • trunk/ClassLibrary/UrlHelper.cs

    r3 r11  
    2222        public static string GetRelativeSiteRoot() 
    2323        { 
     24            if ("/".Equals(HttpContext.Current.Request.ApplicationPath)) 
     25            { 
     26                return String.Empty; 
     27            } 
    2428            return HttpContext.Current.Request.ApplicationPath; 
    2529        } 
     
    3943                Protocol = "https://"; 
    4044 
    41             string sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port + HttpContext.Current.Request.ApplicationPath; 
     45            string sOut; 
     46            if ("/".Equals(HttpContext.Current.Request.ApplicationPath)) 
     47            { 
     48                sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port; 
     49            } 
     50            else 
     51            { 
     52                sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port + HttpContext.Current.Request.ApplicationPath; 
     53            } 
     54 
    4255            return sOut; 
    4356        } 
  • trunk/Logs

    • Property svn:ignore set to
      MappingWebsite.log.txt
  • trunk/SmallSharpTools.UrlMapper.sln

    r3 r11  
    33# Visual Studio 2005 
    44Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary", "ClassLibrary\ClassLibrary.csproj", "{FB9ABB77-D18C-4768-8E3E-4061B82FEB51}" 
     5        ProjectSection(WebsiteProperties) = preProject 
     6                Debug.AspNetCompiler.Debug = "True" 
     7                Release.AspNetCompiler.Debug = "False" 
     8        EndProjectSection 
    59EndProject 
    6 Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "D:\...\Website\", "Website", "{42C5215E-3757-4AC3-81A5-4DFBDD4F1272}" 
     10Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "D:\...\Website\", "Website\", "{42C5215E-3757-4AC3-81A5-4DFBDD4F1272}" 
    711        ProjectSection(WebsiteProperties) = preProject 
    812                ProjectReferences = "{FB9ABB77-D18C-4768-8E3E-4061B82FEB51}|SmallSharpTools.UrlMapper.dll;" 
     
    2125                Release.AspNetCompiler.FixedNames = "false" 
    2226                Release.AspNetCompiler.Debug = "False" 
    23                 VWDPort = "2305" 
     27                VWDPort = "8002" 
     28                VWDDynamicPort = "false" 
     29                VWDVirtualPath = "/" 
    2430        EndProjectSection 
    2531EndProject