473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem Regarding Accessing javascript enabled secure Web Pages

Hi All,

I'm facing problem regarding Accessing secure web page.
I tried to connect page through progamming & want access data from web page.
I passed Login credentials & also certificate which required for secure site.
The "view Source" is in javascript.
Please Help.
Thank You.
Mar 26 '07 #1
6 1746
MMcCarthy
14,534 Expert Mod 8TB
This question is being moved to the Javascript forum.

ADMIN
Mar 26 '07 #2
acoder
16,027 Expert Mod 8TB
Hi All,

I'm facing problem regarding Accessing secure web page.
I tried to connect page through progamming & want access data from web page.
I passed Login credentials & also certificate which required for secure site.
The "view Source" is in javascript.
Please Help.
Thank You.
You'll have to give more details. You want to access data from a web page? Is this your own web page?

What do you mean by "view source" is in Javascript?
Mar 27 '07 #3
You'll have to give more details. You want to access data from a web page? Is this your own web page?

What do you mean by "view source" is in Javascript?
Thanks,
Actually web page is not my own.
I developing C#.net console application to connect secure web site(https).
I able to connect it if I use browser.I passed the credentials to it & access it.

But problem is in accessing it through programming. I have passed credentials but the page I get in response is the page containing frames with error displayed in each frame like-'Internet Explorer cannot display the webpage'
Mar 27 '07 #4
acoder
16,027 Expert Mod 8TB
What are you using to access the page?

You'll probably need a server-side language to do this, but show how you're trying to access the page.
Mar 28 '07 #5
//certificate code here
string postData = String.Format("Userid={0}&txtPassword={1}&submit=L ogin&cbxChgPwd=false&portoforigin=15", USERNAME, PASSWORD);
CookieContainer cookies = new CookieContainer();
HttpWebRequest webRequest;
string responseData;
StreamReader responseReader;
webRequest = WebRequest.Create(LOGIN_URL) as HttpWebRequest;
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.CookieContainer = cookies;
webRequest.ContentLength = (long)postData.Length;

StreamWriter requestWriter = new StreamWriter(webRequest.GetRequestStream());
requestWriter.Write(postData);
requestWriter.Close();

//for 2nd request
webRequest = WebRequest.Create(SECRET_PAGE_URL) as HttpWebRequest;
webRequest.CookieContainer = cookies;
responseReader = new StreamReader(webRequest.GetResponse().GetResponseS tream());

responseData = responseReader.ReadToEnd();
responseReader.Close();

StreamWriter sw1 = new StreamWriter("c:\\Temp\\abc.html");
sw1.Write(responseData);
sw1.Close();
}

//The 1 st request for login page with credentials
//LOGIN_URL-Page to which we pass credentials.
//postdata-string contains credentials.
//no need of 1 st page response data
//After that 2 nd request for next page which we want after successfull login.&
//save its response in local html file.
//SECRET_PAGE_URL-2 nd page url
//cbxChgPwd & portoforigin are hidden fields
Mar 28 '07 #6
acoder
16,027 Expert Mod 8TB
Is that C#? It looks very much like Java. I'll move this to the .NET forum.
Mar 29 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Astra | last post by:
Hi All I know this probably sounds like a newbie question, but I was under the impression that secure pages (https) don't appear in the history/address bar history list - this appears to be...
9
by: Carter Smith | last post by:
http://www.icarusindie.com/wiki/index.php/Server-Side_Javascript_Check Sample source included This method requires that your pages are PHP enabled and you have mySQL. Although I suppose you...
5
by: Full Name | last post by:
The question is not about writing javascript, but having it execute in a browser (IE, firefox or opera, doesn't matter). Since the last series of updates in win2K, javascript no longer executes. ...
2
by: Carl Read | last post by:
Hi, First I would like to state that I am not a JavaScript expert. I have a simple shopping basket that uses cookies. The problem is that all the product pages and basket must be in the the...
10
by: David Thielen | last post by:
Hi; When a user clicks a radio button, what I would like to do is that if javascript is enabled on their browser, it calls a javascript function and does not do a postback. If javascript is...
0
by: amitvps | last post by:
Secure Socket Layer is very important and useful for any web application but it brings some problems too with itself. Handling navigation between secure and non-secure pages is one of the cumbersome...
15
by: Prisoner at War | last post by:
Okay, I think I'll soon be getting all the JavaScript/CSS/DHTML- related "site mechanics" wrapped up...at least until I decide on real Ajax-style interactivity next year! But until then, I'd be...
10
by: Dutchmarshalls | last post by:
Hi All, I'm using a Pay Pal form script, but locally tested in Dreamweaver with a browser it will do exactly what I'm aspect it to do. Only when I'm uploaded the file on the server it will give...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.