using a C# service to login on an asp page and send a request /command

  • Thread starter matthijsdezwart
  • Start date
M

matthijsdezwart

Hi,

I’m pretty new at C# and experimenting with some stuff since a couple
of months.

I was wondering if it is possible to pass a web-based login (in an ASP
page) and send a request to the page.

To be more precise: I have an Asus router, that can be configured
trough a web interface (asp). Due to security reasons, there is a
login on it, if you want to access the WAN Interface page, you need to
login (pop-up login window, just as on other server based login’s)
before you can click a button to realase the ipconfig settings and
then another button to renew the ipconfig settings.

Due to some reason, the ipconfig settings in my router needs to be
reset quit often. So I would like to create a service on my laptop,
that checks whether or not I have a live internet connection, if not,
then I would like to realease and renew the ipconfig within my router.

Does anyone know how to send a request to an ASP page that is behind a
login?
regards,

Matthijs
 
A

Arne Vajhøj

I’m pretty new at C# and experimenting with some stuff since a couple
of months.

I was wondering if it is possible to pass a web-based login (in an ASP
page) and send a request to the page.

To be more precise: I have an Asus router, that can be configured
trough a web interface (asp). Due to security reasons, there is a
login on it, if you want to access the WAN Interface page, you need to
login (pop-up login window, just as on other server based login’s)
before you can click a button to realase the ipconfig settings and
then another button to renew the ipconfig settings.

Due to some reason, the ipconfig settings in my router needs to be
reset quit often. So I would like to create a service on my laptop,
that checks whether or not I have a live internet connection, if not,
then I would like to realease and renew the ipconfig within my router.

Does anyone know how to send a request to an ASP page that is behind a
login?

(Http)WebRequest can login with both HTTP BASIC authentication and
form based session login and do stuff via POST and GET requests. It
just requires some coding. It is often easier to troubleshoot if you
have a sniffer.

Maybe even WebClient can do it, but I am not sure.

Arne
 
M

matthijsdezwart

(Http)WebRequest can login with both HTTP BASIC authentication and
form based session login and do stuff via POST and GET requests. It
just requires some coding. It is often easier to troubleshoot if you
have a sniffer.

Maybe even WebClient can do it, but I am not sure.

Arne- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

Thanks. I will look into the class.
regards,

Matthijs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top