Re: Accessing and displaying SSL web pages and cookies from a windows form

From: Justin Engelman (GlobNews_at_adelphia.net)
Date: 02/26/04


Date: Wed, 25 Feb 2004 20:38:57 -0800

Hmmm, ok, perhaps I didn't explain it well enough...
I am actually creating a client/server application. The server is a
webserver running IIS and is set up already, my question is about creating
the Windows Form client (compiled to an exe) that will run on users'
machines. It needs to be able to talk to the webserver through http calls
or LoadXML calls to urls on the website in order to get data or post data to
the server. Normally I would do this through XMLDocument.LoadXML calls,
passing the url of the page I want to load (since I can set my pages up to
return XML). My problem is that any call to any page on that web site is
first redirected to a SSL login page, if a particular cookie is not present,
by an ISAPI filter installed in IIS for that site. So if I try to
programmatically get data from the website to load into a listbox control on
my Windows form the call will get redirected to the login page because the
cookie is not present instead of getting the data.

So I think what I need is the Windows Application upon load to essentially
look/act just like Internet Explorer by being able to navigate to the
website SSL login page and display that page to the user just as it would be
displayed in Internet Explorer and once the user logs in to capture and be
able to persist the cookie that the login page creates for future
programmatic calls to that website.

I also need to be able to tell in my Windows application that the user
successfully logged in by reading the cookie that is generated or the page
that the login page redirects back to.

example of my problem:
if I try making a call like
myXmlDom.LoadXML("http://whateversite.com/someData.xml"), instead of loading
someData.xml, it will get redirected to the login page and try to load that
into myXmlDom and fail because that is not properly formatted XML (and even
if it were, it would not be the data I wanted).

Am I making sense? Does this still sound like something that should be
posted in the ASP.NET group instead of here?

Thank You,
Justin

"Cor" <non@non.com> wrote in message
news:uU5%23Bl3%23DHA.2292@TK2MSFTNGP12.phx.gbl...
> Hi Justin,
>
> A more ASPNET question I have seldom seen.
> (If you have the logical solution, than maybe we can help you with
VB.net).
>
> I think you can ask this question better in this newsgroup.
>
> Aspnet
> <news://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet>
>
> Web interface:
>
>
<http://communities2.microsoft.com/communities/newsgroups/en-us/?dg=microsof
> t.public.dotnet.framework.aspnet>
>
>
> I hope this helps a little bit?
>
> Cor
>
> "Justin Engelman" <GlobNews@adelphia.net> schreef in bericht
> news:Mu-dnfhhbvGquaHdRVn-ug@adelphia.com...
> > Hi,
> > I have a website that uses an ISAPI filter that will redirect anyone
going
> > to any page on the site to an SSL login page (on a different website
with
> > the same root domain) if they do not have the appropriate session cookie
> > already. After logging in on that page successfully they are given the
> > cookie and redirected back to the page they initially tried to go to.
> >
> > I would like to create a Windows application that gets data from that
> > website and utilizes that SSL login form and the session cookie
generated
> by
> > it. Then as the user is using the application it will make calls to the
> > website to get needed information, which will cause the ISAPI filter to
> see
> > that the user has that cookie.
> >
> > I don't have control over the user logins or passwords or the ISAPI
filter
> > code or SSL login page.
> >
> > My question is, is it possible to display the login webpage from my
> > application when the application is first loaded, then to capture the
> cookie
> > after the user logs in and the data generated by the page they are
> > redirected back to after login. If it is, how would I go about doing
> that?
> > Also, how would my application "remember" the user's cookie so that
> > subsequent calls to my website to get data can authenticate the user
from
> > the data in the cookie and also not redirect to the login page.
> >
> > Thank you for any help you can give me,
> > Justin
> >
> >
>
>



Relevant Pages

  • Re: Accessing and displaying SSL web pages and cookies from a windows form
    ... > I have a website that uses an ISAPI filter that will redirect anyone going ... > cookie and redirected back to the page they initially tried to go to. ... > website and utilizes that SSL login form and the session cookie generated ... > the data in the cookie and also not redirect to the login page. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: A little problem with Forms authentication :-(
    ... I'm using forms authentication and the user is getting authenticated no ... should be redirected to the login page. ... I've set the time out for the cookie to the test value of 1 ... redirect from login bit because as I understand it, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Accessing and displaying SSL web pages and cookies from a windows form
    ... I have a website that uses an ISAPI filter that will redirect anyone going ... cookie and redirected back to the page they initially tried to go to. ... website and utilizes that SSL login form and the session cookie generated by ...
    (microsoft.public.dotnet.languages.vb)
  • Re: FormsAuthentication.RedirectFromLoginPage()
    ... Maybe there is some problem in your cookie code and you get bounced back again to login.aspx....?! ... Dominick Baier - DevelopMentor ... the login form is taking care of ... Is it possible to redirect from the login page to a page other than ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Cookie Redirect Script
    ... of comp.lang.javascript make plain: ... > On my website, I get quite a bit of 404 traffic. ... > for is the first time a surfer goes to the 404 page, it will redirect ... Make your 404 page a page which just checks the cookie, ...
    (comp.lang.javascript)