Know Previous URL Without Using URLReferrer?
Sep 16, 2010
I am developing a .net website using Visual Studio 2008.
Now this webpage should be open only from link available on other website. User should not be able to type the URL directly in browser and should not be able to open this way directly. When user logs in to other website, there is a link for my website and when user clicks on that link, then only my website should be opened up.
Now, I can not use "Request.UrlReferrer" because it is not 100% correct way as there are many ways that URLReferrer can be blocked by browser or by some antivirus or etc, so I cannot use URLReferrer on my webpage to check from where this page is opened up.
Now my question is what is the best way to check on my webpage that my site has been opened up only from that source? I can also pass some querystring from that website but I am not sure how can I make sure that my webpage opens up only from that source, not when user directly types URL in the browser.
View 5 Replies
Similar Messages:
Feb 15, 2011
in my web application Request.UrlReferrer is null. how can i set UrlReferrer ?
View 1 Replies
Mar 25, 2011
I am trying to get the QueryString value like this Request.QueryString("SYSTEM") from a UrlReferrer. I see i can use this Request.UrlReferrer.Query() but it doesn't allow me to specify the exact parameter I could parse the Query() value, but I want to know if it is possible to do something like this Request.UrlReferrer.QueryString("SYSTEM")
View 1 Replies
Apr 29, 2010
Here's the scenario, we've built a url shortener (that we use only to shorten urls for Twitter to our website), and we also track the number of times a url has been clicked. So, for example.. the url might be something like "http://ourshortdomain.com/x9Mr"
Now, in many cases, we see as many as 1000 or 2000 clicks per shortened url, but the referrer is almost always null. How can this be, if the only place we're handing out that shortened url is on Twitter? Shouldn't all the url referrers be coming from Twitter?...
View 1 Replies
Jul 26, 2010
I am developing a web application in ASP.NET3.5 with C#. I also using Telerik RadAjax Control. When user click the menu then open the page with a new tab(Like web Browser).I want to create, when user back any previous tab(page) the will be show the previous data without loading 2nd time( like browser tab). Is it Possible ?
View 2 Replies
Sep 9, 2010
I came upon an interesting discussion with my team around the use of HttpRequest.UrlReferrer and wanted to solicit feedback from the community. According to the W3C spec:
The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the"referrer", although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard.as input from the user keyboard.
The Request.UrlReferrer object does the work of converting referral strings that contain well formed URIs to an object with properties on every request. According to our logs there are requests that come in that contain invalid data in the referral such as:
localhost
app:/BeamBackTest.swf
app:/multtiple.swf
app:/AFriendFeed.swf
ALToolBar
app:/index.html
mhtml:file://C:Documents+and+SettingsUserDesktoporacleWhat+is+a+View+in+Oracle+-+Stack+Overflow.mht
Using Request.UrlReferrer would mean the above cases would be NULL. Is it better to discard the invalid data based on the W3C spec by using Request.UrlReferrer or preserve it by using Request.ServerVariables["HTTP_REFERER"] even though the data may be interesting, but potentially useless.
View 2 Replies
Dec 22, 2010
I want to use UrlReferrer after the user has signed-in.
Can UrlReferrer also refer to a webpage outside of the web project? .. this is not what I want...
View 1 Replies
Sep 25, 2010
I am working on an app where users are only allowed access if they click through from certain URLs. I.e. I need to authenticate by using the referral url and I am using
Request.UrlReferrer to achieve this.
I am guessing that the Request.UrlReferrer can be tampered with by malicious users to gain access...
View 3 Replies
Nov 24, 2010
What I am trying to solve here is to check for what is previous page's url and compare it. If it is login.aspx then I want to display an WelcomeNote() message. Any help would be deeply appreciated. Here's the codes.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.UrlReferrer IsNot Nothing Then
View 4 Replies
Aug 19, 2010
I am redirecting between two pages, when I use a hyperlink I get the Page1 in the UrlReferrer field, but using Response.Redirect gives it null.
AFAIK both of them act similarly for a redirection.
View 1 Replies
Apr 25, 2010
i have a problem in my asp application . Im trying to protect the path for my application using this code :
Uri t = Request.UrlReferrer;
View 10 Replies
Jan 10, 2011
I have the following code in 'main.cs' file where I am checking for a condition
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Form.Get("task") != null && Request.Form.Get("postToURL") != null &&
Request.UrlReferrer.ToString().Substring(0, 31).Equals("http://cs.astra.co.in:4040"))
{
ASCIIEncoding encoding = new ASCIIEncoding();
<SO ON>
Instead of checking for the URL [URL] in 'main.cs', Can I check for the same condition in the 'web.config' file ? If so, How can I do that ?? Is there any way to transfer the part -- Request.UrlReferrer.ToString().Substring(0, 31).Equals[URL] -- into the 'web.config' !!
[Code]....
View 1 Replies
Aug 2, 2010
I'm using a wizard control with 4 steps, when I use the previous button to navigate back to the previous step the page reloads but at the bottom of the page.Instead of showning the whole of the page, the user views the footer of the site and the previous button and next button.I'm sure there is a very simple answer to this but I just can't figure out how to get the page to reload to the top.
View 8 Replies
Jan 5, 2011
I am having problem while using onclick="javascript:history.back();" with Aspnet. In the first page i filled some data and click search button it show some results, i click on particular result for its details which navigate to the 2nd page but when i click on custom back button it refresh the page and all data set to initial values,when i use onclick="javascript:history.back();" I get nothing but the page displays "webpage has expired."
View 1 Replies
Aug 25, 2010
Both returns the incoming url, Just to know When to use Request.UrlReferrer and when Request.ServerVariables["HTTP_REFERER"] and why?Currently, in one of my application Urlreferrer is working in my local machine but its not working when went live?Additionally, its most appreciable if anyone can guide any alternative of both Urlreferrer and HTTP_REFERRER?
View 1 Replies
May 6, 2010
I can get the current action name by using the following code
var currentActionName = ControllerContext.RouteData.GetRequiredString("action");
but is it possible to get the previous action name as well?
View 1 Replies
Aug 5, 2010
Using C#, I want to get a value from previous page. For example, In a page A i have the textbox value like "apple", i want to get the same value in page B Page A Code.
<a href="javascript:void(0)"
onclick="window.open('pageB.aspx',
'Add','width=700,height=400')">
Add</a>
Above Code is linking a Page B from Page A How to get a value page A textbox value in Page B.
View 3 Replies
Mar 22, 2010
I want to set a DateTime property to previous day at 00:00:00. I don't know why DateTime.AddDays(-1) isn't working. Or why DateTime.AddTicks(-1) isn't working. First should this work?
I have 2 objects. Each object have DateTime fields ValidFrom, ValidTo.
EDIT: After coming home from work I tried to get the same behavior as my business objects behave. Below are the code I tried to replicate how it looks at work. Of course this is working at home but not at work. The good thing is I got good answers and +1 on all! =)
public class RuleValue
{
public DateTime ValidFrom, ValidTo;
public RuleValue(DateTime _validFrom, DateTime _validTo)
{
[Code]....
View 5 Replies
Sep 19, 2010
my login page contains username and password field. when the user name is correct then the page will be redirected to Default.aspx page...for that i am using Response.redirect("Default.aspx") page is redirecting correctly. but wat the pbm is the username should be displayed in Default.aspx page after redirecting.....for displaying it i am using
Label4.Text = CType(PreviousPage.FindControl("TextBox1"), TextBox).Text in Default.aspx.....
but the vale of TextBox1 in login.aspx page is not displaying in Default.aspx page.
View 2 Replies
Apr 12, 2010
i am getting previous page name from
Request.UrlReferrer.ToString()
but not able find name how can i do this
View 5 Replies
Mar 19, 2010
I need to access the previous page URL but because I am using a MasterPage, I am having difficulty achieving this.
Request.UrlReferrer
This only returns the URL of the current page.
View 1 Replies
Jan 4, 2011
I have a page in asp.net by clicking on the grid in the page it takes me to the detail page,on this page i have a back button (not browser back) by clicking on the button it takes me again to the search page. i want to see the page with changes which i have made before coming to the detail page,also i want to disable back button of browser. i dont want to use session variable or viewstate variable. is there any property for this scenario.
View 3 Replies
Jun 3, 2010
My MVC 2 app is somewhat complicated in that a user can reach different parts of the site in different ways
How can i add a "back" link so that it remembers where it came from?
View 2 Replies
May 18, 2010
how to get the full URL from a page the was redirected from a DNS redirect? I'm using ASP.net 2.0 with C#.
View 1 Replies
Oct 28, 2010
Is there a way to return to the previous view without having to record all the parameters that were used to get to the view in question. Consider this situation. You have a search screen with input parameters, you press search and get results displayed on the page. You click on one item to get a detailed look which redirects you to a new view. Does MVC have the ability to get the previous query string that contains the search parameters?
View 3 Replies