[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1760
  • Last Modified:

Can Global.Application_Start() get the URL?

How would the Application_Start() method in the Global.asax file get the URL the user used to load to the program?

OR

How might the Global object find the username and password used to log onto a releated website of ours? I want to use Single Sign On but since the browser has the cookie locked down, I need the other program or the browser somehow provide this information to Global.Application_Start() on the second website to load.

Thanks,
newbieweb
0
newbieweb
Asked:
newbieweb
  • 2
  • 2
1 Solution
 
Paul JacksonCommented:
should be able to use :

System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString();
0
 
Paul JacksonCommented:
For the username I think this will work :

System.Web.HttpContext.Current.User.Identity.Name
0
 
newbiewebAuthor Commented:
The first one worked, but the User was null in the second one.
0
 
newbiewebAuthor Commented:
I'll deal with the User later. Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now