I request a URL as https://user:pass@domain.com/etcetc
In Controller, I use Request.Url.UserInfo get nothing, empty string, why?
Or, how can I get user:pass at controller
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here are a couple of things to check.
1) What does the raw url look like?
2) Validate that the UserInfo property works (which Microsoft says it does, and my tests show it does as well).
Based on my own tests I would guess that the user:password portion is being stripped out before it gets to your page. In IE, as others have stated, I was unable to get it to take the values. In Chrome it also seemed to strip them off automatically (after I had typed in the address and hit enter the values disappeared from the address bar immediately).