Python : Problems getting past the login page of an .aspx site - asp.net

Problem:
I have searched several websites/blogs/etc to find a solution but did not get to what I was looking for. The problem in short, is that I would like to scrape a site - but to get to that site - I have to get past the login page.
What I did:
I did manage to use urllib2 and httplib to open the page, but even after logging in (no errors being displayed) the redirection of the login page as shown in the browser does not happen. My code was not too different than what was displayed here: How to use Python to login to a webpage and retrieve cookies for later usage? ; except that I did not use Cookies.
What am I looking for?
I am not entirely sure what fields I need to be looking for besides the "username" and "password" fields. What I would like for the script to do is
1) Successfully login to the .aspx site and display a message of some sort that the login was successful
2) Redirect to another page after logging in, in order for me to scrape the data off from the site.
3) How to gather any site's POST/GET fields so I know that I am passing/calling the right parameters?
Any assistance/help/advise would be much appreciated.

Related

Always showing cookies error for a first time visitor trying to login

I am using WPBrigade plugin "LoginPress" and has a login page which is created from file: wp-login.php.
If a new visitor is logging into the site, it displays an login_error with the following warning:
quote Error: Cookies are blocked or not supported by your browser. You must enable cookies in order to use WordPress.
If the user tries to login again without clicking on the link provided by the error message and do not adjust browser settings regarding cookies the login works fine and the user is logged into the site. If they click on the link they are redirected to wordpress official site regarding cookies. If they then return to the site it works fine (since it's a second attempt like in the first case).
My problem is that I want the user to be able to login without having this warning that disturbs the user experience. The login process is now 2 steps with a mandatory second try that works. I want it to work the first time. I can't seem to find the solution plugin documentation, and niether on wordpress site.
Check the issue by enabling the debugging in WordPress
https://wordpress.org/support/article/debugging-in-wordpress/

How to set a login page to see the website in wordpress?

i'm a beginner and I'm trying to set a login page on my website build in wordpress. Searching on google I don't find a solution for my issue. There are a lot of plugins that customize the login page in wp-admin to acces at the backend. What I'm trying to do is different. I'd like to put a login page at my website www.example.com (home page) and after the user has insered the credentials, he can see everything on the website. I don't know how to start. Every suggests are appreciate. Thank you in advance
If you're ok with using WP users table and auth systems you could put template content inside a conditional to check if users are logged in.
It isn't elegant but it would get you what you want.

Can i have two Default ASPX pages?

Actually i've started to programm in ASPX using VB.NET as language i've made a client part website where the user can see different kind of products in the Default.aspx page and open a support ticket in another page.
Now i would make an admin part of the website and make a different Default page for it. So the question is it possible to show another Default.aspx page if an admin is logged?
Actually i'd accept all suggestion on how could i do it as better as possible.
Solved by using
FormsAuthentication.SetAuthCookie(username.Value, True)
Instead of
FormsAuthentication.RedirectFromLoginPage(username.Value, True)
It is not necessary.
You can have two pages and redirect or show the Admin's Page when the administrator is logged in.

Tracking login in user time on page on Wordpress

I have a simple informative website built in Wordpress. Users must login befor they can view pages ,I would like to track the time each user is viewing each page. Is there a simple plugin or JavaScript I can use to make a database of this information.
Would something like the following suffice?
https://en-gb.wordpress.org/plugins/aryo-activity-log/

Unable to "login" via twitter API

I have implemented a twitter login for my site, using a plugin called "Simple Twitter Connect".
Now what this plugin does is create a twitter login function for my site above the the comments section which allows users to use their twitter details rather than filling out name and email boxes.
Now the problem I am having with it is when it gets to the authorize page on twitter.com, after entering the details and then going back to the site it loads solicialize.gigaya.com page.
On the contents of the page it says
Failed connecting. Please try again later
I initially thought it must simply be something wrong with the plugin, however I have contacted the plugin author and he as said that gigya has nothing to do with his plugin nor does his plugin link to it.
I havent signed up to gigya nor implemented any of their functions on my site, so I'm not sure how this site gets into the equation.
If anyone wants to recreate the issue, the click here and login via twitter.
Can anyone suggest what the issue may be?
After the successful OAuth-Login you are redirected to the Callback URL associated with your Consumer key. The Callback URL can be configured - here's how you do it:
Log in to https://dev.twitter.com/apps
Select the application which you are using in your blog
Go to the "Settings" tab and you'll find the Callback URL under "Application Type"
Set the URL to your blog base directory (where the index.php is).

Resources