p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   Http web request (http://p2p.wrox.com/showthread.php?t=71109)

Nadeem October 21st, 2008 02:38 AM

Http web request
i want to display yahoo site on my web page. After posting user name and password with httpwebrequest and handling redirection it gives an javascript error " You need to have Javascript enabled in order to use the all-new Yahoo! Mail." ,
how to handles this ? please help me.

alliancejhall October 21st, 2008 10:37 AM

If you are using internet explorer (or any user) click the tools menu and choose internet options. Click the advanced tab and enable javascript and enable it under the security settings for internet. You might also have to go to www.java.com and download the latest version of java.

Jason Hall

planoie October 21st, 2008 07:25 PM

Are you planning to give everyone access to your email?

Be aware that when you programmatically access the yahoo site to log in, it's a different session from the perspective of the yahoo servers than the session of the user viewing your site. So even though you log in from your application the user won't be logged in.

Jason suggested that you might need to install java. You don't need to do that just to get javascript functionality.


Old Pedant October 21st, 2008 08:48 PM

Jason is way off on this one, and I don't think Planoie really explained what the problem is.

But first of all, I have to say that this project *FEELS* like an attempt at identity theft. Why would you want to act as an intermediary between a user and Yahoo??? Why would anybody TRUST you to act as an intermediary?? After all, you would be able to capture their usernames and passwords and all other personal info. You wouldn't catch me using your site.

If this *is* an identity theft attempt, then I'm happy to say I don't think you will succeed. But even if you have legit reasons for this, I don't think you will succeed. Here's why:


When you access the Yahoo email site in your browser, Yahoo utilizes cookies and scripting to control the page and (as Planoie noted) get access to your email data. It detects whether or not JavaScript is enabled by one of several simple means. (A simple example: It uses JS to set the value of some form field and then has a meta-refresh that submits the form. If it doesn't see the expected value in the form field, it knows that JS didn't set the value, and so it gives you that message. I can think of a handful of other ways to make such a check.)

When you use HttpWebRequest to hit the Yahoo site, there is no possible way that you can simulate the actions of JavaScript in the browser. (Well, it *COULD* be done, but you'd need to be a major expert in browser and web technology to pull it off.) Further, unless your request passes along all the cookies and User Agent String info that Yahoo expects, your request will fall flat on its face.

In short, I think this whole experiment is doomed to failure from the start. The fact that you had to ask the question in this forum tells me that you aren't somebody with the expertise to pull of a browser simulation and thus fool Yahoo.

Just as a point of reference: I consider myself *somewhat* knowledgable in this area. Example: I know all the components of a User Agent String, and I know what form a cookie must have, I know how to parse JavaScript, though I couldn't emulate it, and more. *I* would not tackle this project, because I think it could easily eat up a few MONTHS of my time.


If all you want to do is give your users a spot on your page where they can view their Yahoo mail, then there is an easy answer. Just use an <IFRAME> or <FRAME> and load Yahoo into it. (Of course, Yahoo might have some frame-busting protection built in, so that wouldn't work. Dunno.)

alliancejhall October 22nd, 2008 08:51 AM

Thanks Bill for the CORRECT explanation, I'm sorry I gave bad info but I learned something from you as I always do. I guess i just didn't understand what the true issue was. Hopefully this person isn't attempting ID theft either!

Jason Hall

Nadeem October 27th, 2008 07:28 AM

My friends, I want to make a project just like http://flyproxy.com/
With also able to sign in yahoo, Gmail, hotmail.
for now i able to display yahoo mails page in my site and working further on it.

All times are GMT -4. The time now is 08:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.