473,626 Members | 3,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

http sessions and .Net Windows Forms

Hi,

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

System.Diagnost ics.Process.Sta rt(strURLComman d)

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 4539
Hi Mark,

System.Diagnost ics.Process.Sta rt(strURLComman d)
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/cpconcookieauth enticationusing anxmlusersfile. 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**@SIRIOInfo rmatica.it>
Sender: "Mark" <In**@SIRIOInfo rmatica.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/6DqIUJl7YORoaLP mkKDzwEwQ==
Newsgroups: microsoft.publi c.dotnet.genera l
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:108843
NNTP-Posting-Host: TK2MSFTNGXA05 10.40.1.49
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Hi,

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

System.Diagnos tics.Process.St art(strURLComma nd)

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
authenticati on 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.Diagnost ics.Process.Sta rt(strURLComman d)

If no, you may try to automation InternetExplore r. 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.Interne tExplorer ie;
private void button1_Click(o bject sender, System.EventArg s e)
{
ie = new SHDocVw.Interne tExplorerClass( );
ie.Visible=true ;
object o = Missing.Value;
ie.Navigate("ht tp://localhost/test/logon/default.aspx",r ef o,ref o,ref
o,ref o);
}

private void button2_Click(o bject sender, System.EventArg s e)
{
object o = Missing.Value;
ie.Navigate("ht tp://localhost/test/logon/srcview.aspx",r ef 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**@sirioinfo rmatica.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.publi c.dotnet.genera l
Date: Wed, 17 Sep 2003 23:52:37 -0700
NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:109000
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

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**@sirioinfo rmatica.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.publi c.dotnet.genera l
Date: Thu, 18 Sep 2003 01:23:17 -0700
NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:109007
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

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
12035
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 on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or Konqueror on Linux) the session variables will mix up and only the latest selection or options will...
7
2437
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 ($_SESSION as $page=>$_POST) { echo "<div class=\"h3\">$page</div><br>"; foreach ($_POST as $field=>$value)
3
2463
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 (IIS 5.0) with ASP 3.0 (no .NET on this site). Sometime, data in session is emptied. I say "sometime"
4
1912
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 requires the user to log on. As it is now I simple create the new forms and the webpage asks me to log in again. Is there some way of making all the web browser controls use the same internet sessions or something similar which will have the desired...
3
2128
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 parameter set in their session when they log in. I would like to be able to get every logged- in user's parameter value. If this can't be done, please let me know and I'll have to find a way around it. Thanks.
5
673
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 web.config file is configured as such: <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" name="myApplication"/> </authentication>
6
3782
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 one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
5
227
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 Page with authentication mode="Forms". In this way, the browser displaies the
3
28222
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 developer needs to know how to use. This article explains the basics of PHP Sessions. Assumptions: Basic PHP knowledge is required (variables, arrays and such) HTML Forms. What are Sessions? Sessions are a way of storing data. When developing...
0
8638
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8365
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,...
0
8505
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 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...
0
5574
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();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
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
1
1811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.