473,410 Members | 1,872 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,410 software developers and data experts.

http sessions and .Net Windows Forms

Hi,

I want to run in my .Net Windows Form this statement

System.Diagnostics.Process.Start(strURLCommand)

to open the browser and navigate to the specified URL.

The URL is an ASP.Net Web Page with authentication
mode="Forms". In this way, the browser displaies the
authentication ASP.Net WEB page, every time the
application executes the statement.

I want to display the authentication page only the first
time.

Ho can I do?

Thank's
Jul 21 '05 #1
5 4511
Hi Mark,

System.Diagnostics.Process.Start(strURLCommand)
the code line will open a new process every time you excute.
for the design by process, the http session is not same in two process.
If you want to do so, then the web sites must support cookie.
You may try to make a test by following the link below.
Forms Authentication Using An XML Users File
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconcookieauthenticationusinganxmlusersfile.asp
You may check Persistent Cookies: option in the example webpage in the link
above.
Then you may using the IE to open the website many times without login.

Did I misunderstand your meaning?
Can you tell me what aim do you want to achieve, so I can help you.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Content-Class: urn:content-classes:message
From: "Mark" <In**@SIRIOInformatica.it>
Sender: "Mark" <In**@SIRIOInformatica.it>
Subject: http sessions and .Net Windows Forms
Date: Wed, 17 Sep 2003 08:25:58 -0700
Lines: 19
Message-ID: <04****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcN9L/6DqIUJl7YORoaLPmkKDzwEwQ==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108843
NNTP-Posting-Host: TK2MSFTNGXA05 10.40.1.49
X-Tomcat-NG: microsoft.public.dotnet.general

Hi,

I want to run in my .Net Windows Form this statement

System.Diagnostics.Process.Start(strURLCommand)

to open the browser and navigate to the specified URL.

The URL is an ASP.Net Web Page with authentication
mode="Forms". In this way, the browser displaies the
authentication ASP.Net WEB page, every time the
application executes the statement.

I want to display the authentication page only the first
time.

Ho can I do?

Thank's


Jul 21 '05 #2
Thanks Peter for your answer.

The choice of persistent cookie is a good idea, even if this can, in
some way, to avoid the problem and not to resolve it. In truth I tried a
way in order to capture the session and to maintain it "while still
alive" the entire time necessary, also after the closing of the browser,
while mine .Net Windows Form is in execution. Although that, the
solution from suggested you, seems to be only the possible one.

Thanks newly

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
Hi Mark,

Did you really need to use the code line?
System.Diagnostics.Process.Start(strURLCommand)

If no, you may try to automation InternetExplorer. Here is my code sample.

Make a reference to the Microsoft Internet Controls by opening add
reference dialog and selecting COM/Microsoft Internet Controls
SHDocVw.InternetExplorer ie;
private void button1_Click(object sender, System.EventArgs e)
{
ie = new SHDocVw.InternetExplorerClass();
ie.Visible=true;
object o = Missing.Value;
ie.Navigate("http://localhost/test/logon/default.aspx",ref o,ref o,ref
o,ref o);
}

private void button2_Click(object sender, System.EventArgs e)
{
object o = Missing.Value;
ie.Navigate("http://localhost/test/logon/srcview.aspx",ref o,ref o,ref
o,ref o);
//this one will not need to get authenticated again if you have gotten in
the last page.
}

Did this does the job for you?

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: Mark Mark <in**@sirioinformatica.it>
References: <nI**************@cpmsftngxa06.phx.gbl>
X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
Subject: RE: http sessions and .Net Windows Forms
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <e5*************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
Date: Wed, 17 Sep 2003 23:52:37 -0700
NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
Lines: 1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109000
X-Tomcat-NG: microsoft.public.dotnet.general

Thanks Peter for your answer.

The choice of persistent cookie is a good idea, even if this can, in
some way, to avoid the problem and not to resolve it. In truth I tried a
way in order to capture the session and to maintain it "while still
alive" the entire time necessary, also after the closing of the browser,
while mine .Net Windows Form is in execution. Although that, the
solution from suggested you, seems to be only the possible one.

Thanks newly

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Jul 21 '05 #4
Hi,

I would not want to use the COM technology. My intention is that one to
produce .Net managed code.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5
Hi Mark,

Can you tell me what is aim of your project?
Or the cookie is the way your may need to use.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: Mark Mark <in**@sirioinformatica.it>
References: <HJ**************@cpmsftngxa06.phx.gbl>
X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
Subject: RE: http sessions and .Net Windows Forms
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <#W**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
Date: Thu, 18 Sep 2003 01:23:17 -0700
NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
Lines: 1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109007
X-Tomcat-NG: microsoft.public.dotnet.general

Hi,

I would not want to use the COM technology. My intention is that one to
produce .Net managed code.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
7
by: Quinonez | last post by:
here is the set up. 7 page form all get set to sessions 8th page sessions are called and results displayed for user to see this is the php script for page 8 <? ksort($_SESSION); foreach...
3
by: Maxime Ducharme | last post by:
Hi group We have a problem with sessions in one of our sites. Sessions are used to store login info & some other infos (no objects are stored in sessions). We are using Windows 2000 Server...
4
by: David Pendrey | last post by:
Hi all, I am making a program using the I.E. web browser control and need some (more) help. I need multiple windows open (multiple instances of the web browser) open at once on a page which...
3
by: Dustin Aleksiuk | last post by:
Is there a way to get a list of all the session objects currently running in my web app? I've been looking through the API but I can't find anything yet. In this app, every user gets a certain...
5
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
5
by: Mark | last post by:
Hi, I want to run in my .Net Windows Form this statement System.Diagnostics.Process.Start(strURLCommand) to open the browser and navigate to the specified URL. The URL is an ASP.Net Web...
3
Atli
by: Atli | last post by:
Introduction: Sessions are one of the simplest and more powerful tools in a web developers arsenal. This tool is invaluable in dynamic web page development and it is one of those things every...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
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...
0
isladogs
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...
0
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...

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.