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.
6 1760 MMcCarthy 14,534
Recognized Expert Moderator MVP
This question is being moved to the Javascript forum.
ADMIN
acoder 16,027
Recognized Expert Moderator MVP
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?
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'
acoder 16,027
Recognized Expert Moderator MVP
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.
//certificate code here
string postData = String.Format(" Userid={0}&txtP assword={1}&sub mit=Login&cbxCh gPwd=false&port oforigin=15", USERNAME, PASSWORD);
CookieContainer cookies = new CookieContainer ();
HttpWebRequest webRequest;
string responseData;
StreamReader responseReader;
webRequest = WebRequest.Crea te(LOGIN_URL) as HttpWebRequest;
webRequest.Meth od = "POST";
webRequest.Cont entType = "applicatio n/x-www-form-urlencoded";
webRequest.Cook ieContainer = cookies;
webRequest.Cont entLength = (long)postData. Length;
StreamWriter requestWriter = new StreamWriter(we bRequest.GetReq uestStream());
requestWriter.W rite(postData);
requestWriter.C lose();
//for 2nd request
webRequest = WebRequest.Crea te(SECRET_PAGE_ URL) as HttpWebRequest;
webRequest.Cook ieContainer = cookies;
responseReader = new StreamReader(we bRequest.GetRes ponse().GetResp onseStream());
responseData = responseReader. ReadToEnd();
responseReader. Close();
StreamWriter sw1 = new StreamWriter("c :\\Temp\\abc.ht ml");
sw1.Write(respo nseData);
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
acoder 16,027
Recognized Expert Moderator MVP
Is that C#? It looks very much like Java. I'll move this to the .NET forum.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 incorrect?
Should I really be putting some form of expiry command at the head of each
of these pages if I don't want casual users to see them?
I use Classic ASP so is it better to use a command via this lang or the old
|
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 could also use PHP sessions (not cookies as they're
client editable). You could actually use any server side scripting language
such as Perl or ASP and any database like MS SQL Server. I prefer PHP and
MySQL.
|
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. If I am in an admin logon, it executes fine. I have
installed and uninstalled the java runtime engine several times.
It seems to be a permissions problem, but i am baffled. My
borwsers all have javascript enabled, as dopes my firewall and...
|
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 same folder.
I was wondering if it is possible to create and save a cookie so that it can
be accessed and viewed by HTML pages that are located in various different
folders?
|
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 disabled, then it does do a postback.
Is there a way to do this?
--
thanks - dave
| |
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 jobs.
When a non-secure page references a secure page with relative URL, the web server generates error until absolute URL with https prefix is used. On the other hand when a secure page references a non-secure page, the non-secure page will be...
|
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 interest in strategies for dealing with those
visitors who don't have JavaScript enabled...how I can not only give
them the same access, but not make that access "corny"?
Like, for example, I want a modal window to pop up on a
hyperlink...but...
|
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 this ERROR. By th way, I'm using a Joomla 1.5.3 site.
The URL: http://www.dutchmarshalls.com/index.php/service/51-service/87-price-and-product-list-
The ERROR CODE:...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |