NET ASPX Timesheet website automation, where i have to detect whenever a submit button is pressed by the user and send email automatically.
Unfortunately we dont have access to any website code. Just the website which we can use in internet Explorer.
How to detect the button press? how should i proceed? Do i need to write some custom browser plugin?
Thanks,
Anil
This makes no sense, you're asking how to get access to a websites sessions without having access to the website code or server. I don't think this can be done, in fact I would be really surprised if it can.
Think about the privacy issues.
Related
I am creating a console application in c#(visual studio).
but i don't know where to start.
1st i want to login(phantomjs or selenium)>>then go to a (specified)website URL and extract html?
i want to know how to save login information in my web request.
thank you.
Long story short, it's not easy to do that just with web request because each site has its own way of managing cookies and security.
It's easier if you use a web browser control to login first. From there, the browser can obtain a valid cookie and you can start crawl data from there.
I've done a similar thing with Chegg website. For details, you can check out my repository https://github.com/hungqcao/chegg-solutions-saver
In your case, it can get a little complicated since FB, Twitter may have 2-factor authentication or something similar to that but the idea stays the same.
Let me know if you need help.
Im a rookie in asp.net and have managed to make a funktional webapp. I have a login page that also works correctly and checks username and Password from my mssql db.
My Problem is that i don't know how i can disable all my other sites if your not logged in? At the Moment i can access all my pages if i only now the URL.
So how can i track if im logged in and disable the sites and also i Need to know how to make a logout link that clears all Cookies or whatever it is that saves the Information.
I know this is probably a doublepost but i havent found anything that exactly explains my Problem until now.
Thanks
You are probably looking for the authentication modules, specifically FormsAuthentication.
Start here ... http://www.asp.net/web-forms/videos/authentication
I'm trying to post to a page as an application using C# Facebook SDK, I've browsed through lots of posts explaining how to do so and I think I understood how, the only problem is that when I access /me/accounts/ it just shows applications I have made, it doesn't show any page I'm an administrator, is there anything I need to do besides being an administrator to have the page I want to post to listed on /me/accounts/ ?
Thanks a lot
I used to want my program to open iexplore.exe, and then connect to facebook.com.
Now I want the program to enter the users username into Facebook. Is there any way to use a
third argument in process.start() method?
Thanks in advance :)
To open internet explorer and browse the Facebok page you could do something like the below:
Process.Start("IExplore.exe", "www.facebook.com");
For what I have understand after that you want to put the user name into the Facebook page which cannot be done using Process.Start().
I think the only way you have to do that is by using a web-driver(like Selenium) framework which allows you to "play" with the Web UI
more info at :
http://www.qaautomation.net/?p=373
To answer your question: NO - there is no way to use process.Start in that way.
However, I am sure that it can be done using other methods.
Sources:
Personal Experience,
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx
Some websites might still respond to the http://username:password#domain/folder/page syntax but unfortunately Facebook requires you to input the username and password into textboxes in the actual page.
To handle that, you might get by by simulating a POST request posting the username and password, retrieving whatever it is that Facebook returns that would allow you to continue authenticating to Facebook, but this is going to be specific for Facebook, not something inherent in the http protocol.
In other words, since you want to fork off for iexplore.exe to open Facebook, you're going to have to persuade iexplore.exe to input the username and password and then submit it, which to be honest, I hope is not going to be easy or at all possible.
You could try allowing for Internet Explorer to open the webpage, and then post keypresses to it to simulate the user typing in the username and password.
OR... you could create an addin for Internet Explorer like LastPass, that would input the username and password at the right time.
But... neither would be easy to do.
We are rolling out a site for a client using IIS tomorrow.
I am to take the site down to the general public (Sorry, we are updating message) and allow the client to test over the weekend after we perform the upgrade.
If it is successful, I open it to everbody - if not, I rollback.
What is the easiest way to put a "We're not open" sign for the general public, but leave the rest open to testers?
Redirect via IIS. Create a new website in IIS and put your "Sorry updating" message in the Default.aspx. Then switch ports between the real site (will go from 80, to something else (6666)) and the 'maintenance' site (set on 80).
Then tell your testers to go to yoursite.com:6666.
Then switch the real site back to 80 after taking down the 'maintenance' site.
I thought it would be worthwhile to mention ASP.NET 2.0+'s "app offline" feature. (Yes, I realize the questioner wants to leave the app up for testing, but I'm writing this for later readers who might come here with different needs).
If you really want to take the application offline for everyone (for instance to do server maintenance) there is a very simple option. All you have to do in ASP.NET 2.0 and higher is put a file with this name:
app_offline.htm
...in the root directory of your ASP.NET application. Put an appropriate "sorry come back later" message in there. That's it. The ASP.NET runtime does the rest.
Details on Scott Guthrie's blog.
Require that testers login. You can even hide the login page so that you need a direct link to even see it. Then, for all people not logged in, redirect to the page that displays your message.
Fire up another "site" in IIS which will catch your host-header for your primary site. Use either a custom 307/503/404 page that has "we're down for maintainance" or use some sort of URL-rewrite to redirect people to your single static file.
switch host-header-binding on your real site to something else, like dev.domain.com or testing.domain.com that your developers use.
Or, block by IP, and have your custom "Not authorized" page tell visitors that your down to maintainance.
You have several options.
Some methods that I've used before:
Windows authentication and/or separate subdomains for client to test.
Disable anonymous website access in IIS and give your client a username/password combo to test the website.
Disable default document in IIS and give your client an absolute URL to the main index file.
We tend to have a log in page and an include file across all pages in the site (usually the DB Connection as it's included in all files) that checks for a valid logged in session. If you've not logged in you get a message saying the site's down for maintainance