Restricting page url to be opened into another by simply copying and pasting - c#-2.0

When i Copy my url after logging into another browser it displays the same page instead of login page .This happens even after i close my page

Modify your session handling. The session ID should not show up in the URL (or at least not be used alone for authorization of the request).

Related

Log into one website, then automatically to all other websites

We have two websites. What we want is for a user to log into one website, then, when he goes to another website, he no longer needs to login.
What I did was to place an image on the web page of the first website, which is shown after user logs in. That image is downloaded from the second website. In the action method in the second website which serves the image, I place an authentication cookie and logs user in.
Contradicting outcome:
After user logs into the first website, he still has to log into the second website. Although the image was indeed downloaded from the second website, it did not insert an .ASPXAUTH cookie.
However, if I manually invoke that action method by placing the URL of that action method into browser and hit enter, the second website did insert a .ASPXAUTH cookie, and I no longer need to log into the second website.
What's the difference between the web page on the first website downloading the image, and me doing it manually?

Understanding the public access behaviour in umbraco 7

I have a page with public access, role based authentication, on it. Now when I surf to this page I see my login page, but the url is still the one of the protected page.
Why is this? Can we change this so it redirects normal to the login page?
The built in behaviour of Umbraco is to keep the protected URL in the browser and then display the login page on it. As far as I know, you can't change this behaviour out of the box, but if it bothers you, you can add a check to your login view to check of the request URL matches the URL of the login node (it shouldn't do in in your case), and do a redirect to the actual login page if they're different.
I believe this is done so that it doesn't have to redirect you once you've logged in, as you're still on the URL that you originally requested.

Build web page request in Objective C

I'm building a native application. The app has an embedded webview (UIWebView) pointing to a social website. To be able to use the website inside the app, user has to log in by the webview (username/password) and then he can continue use the site with saved cookies. Normally, the cookies expire after two days. After that, the user has to re-login by the webview.
Now suppose I know username and password of the user and I would like to make the user login automatically with this account when the cookie expires. How can I do that?
I tried to simulate the Login action when I click on Login button on web page, but not successful.By using "Inspect Element" of Chrome, I can see Chrome makes a "Post" request to an URL with some parameters. However, the request doesn't get successful (I use REST client for testing).
Finally I found out the solution. I didn't build requests anymore. I used javascript to set text fields and make "click" action on the webview. Done.

Navigate to original requested page

I have page where are secured by session. In case session does exists, then navigate to login page. This works fine.
Now, Let's say I am at some page like abc.aspx. Session does not exists. System navigates to th login page. So, once login, can i navigate the user to the page which was originally requested ?
Usually it is performed by adding the requested URL as a query parameter to Login page URL http://fakehost/Login?retUrl=originalpage
so app code can redirect it back. Forms authentication mechanism does it for you.
yes you can however it would be recommended to add a ReturnUrl querystring which contains the page they came from or need to go to after they logged in. you can also use Request.UrlReferrer I believe which gives you the page they came from but means if for example they came from google to your site to login and you redirect, it would go back to google.

Facebook Application and URLs

I developed a Facebook application using Ruby on Rails but I have a slightly annoying problem.
When I click any URL inside the application the application redirects to the correct view and everything is working just fine but the URL on the browser is not updating accordingly. The problem is that if I click refresh on the page I will be redirected to the home page of the directory ( that's correct because the URL in the browser is the home URL ) instead of the page that I was.
Example:
App URL:
https://apps.facebook.com/example
Clicking the books link is showing the page correctly but not modifying the browser's URL to:
https://apps.facebook.com/example/books
So next time that I will hit refresh I will be redirected to the home page because the browser link is still:
https://apps.facebook.com/example
Any suggestions?
you need to be aware that your app is an iframe app(i assume you didnt use FBML), that means it is contained in a iframe. So when you create your links, add a target=_top will change the url.
When You create a link You must define target with _parent like:
link

Resources