Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

C# Get URL Details From Browser

Posted on March 15, 2014October 26, 2015 By David Kittell
string sURL = "";
sURL += "Host: " + HttpContext.Current.Request.Url.Host + Environment.NewLine;
sURL += "Host: " + HttpContext.Current.Request.Url.Authority + Environment.NewLine;
sURL += "Path: " + HttpContext.Current.Request.Url.AbsolutePath + Environment.NewLine;
sURL += "Application Path: " + HttpContext.Current.Request.ApplicationPath + Environment.NewLine;
sURL += "URL: " + HttpContext.Current.Request.Url.AbsoluteUri + Environment.NewLine;
sURL += "Path With Query: " + HttpContext.Current.Request.Url.PathAndQuery + Environment.NewLine;

Host: test.domain.org
Host: test.domain.org
Path: /templates/pbcontent.aspx
Application Path: /
URL: https://test.domain.org/templates/pbcontent.aspx?pageid=2147483707&id=86186
Path With Query: /templates/pbcontent.aspx?pageid=2147483707&id=86186

Originally Posted on March 15, 2014
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

C# ASPX Code CSharp

Post navigation

Previous post
Next post

Related Posts

Mac OS – Azure CLI Setup

Posted on September 15, 2017June 26, 2019

Download from Microsoft curl -L https://aka.ms/InstallAzureCli | bash echo "alias az=’$HOME/bin/az’" >> ~/.bash_profile exec -l $SHELL Install using HomeBrew brew update brew install azure-cli brew upgrade azure-cli Originally Posted on September 15, 2017Last Updated on June 26, 2019 All information on this site is shared with the intention to help….

Read More

MSSQL – Datetime In Local Timezone

Posted on February 2, 2017March 26, 2021

This function will get the local time based on the time zone difference from UTC IF OBJECT_ID(N’[GetLocalDate]’) IS NOT NULL DROP FUNCTION [GetLocalDate] GO CREATE FUNCTION [dbo].[GetLocalDate] (@TimezoneDiffInHour FLOAT = – 5) RETURNS DATETIME AS BEGIN RETURN DATEADD(Hh, @TimezoneDiffInHour, GETUTCDATE()) END; SELECT dbo.GetLocalDate(DEFAULT); — or SELECT dbo.GetLocalDate(-5); SELECT dbo.GetLocalDate(+1); Originally…

Read More

HEX to RGB

Posted on August 15, 2013October 26, 2015

function html2rgb($color) { if ($color[0] == ‘#’) $color = substr($color, 1); if (strlen($color) == 6) list($r, $g, $b) = array($color[0].$color[1], $color[2].$color[3], $color[4].$color[5]); elseif (strlen($color) == 3) list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]); else return false; $r = hexdec($r); $g = hexdec($g); $b = hexdec($b); return array($r, $g, $b); }…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes