Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

[Webserver] Website with password protection


  • Please log in to reply
5 replies to this topic

#1 LordOfTheFlakes

LordOfTheFlakes

    Member

  • Members
  • PipPip
  • 25 posts

Posted 15 June 2012 - 02:52 PM

Hi there, I'm new here and just received my first netduino+. Until now I wrote a code that provides a webserver which can get information from the browser throug the request (on loading the page). -> When you watch the request you can see there is the path which I use as command (ex. www.google.com/command1) I start a pc over WOL by opening a special link (ex. www.mydomain.com/wolStartNow). The problem is that EVERYBODY can open the link and start my pc! So I would like to protect access by password. But, (don't forget I'm a netduino and c# beginner) I can't use php on netduino+. Or do I? So, I tried one thing: Using a javascript code that hashes a username and password from a html-form. The generated hash is the command. Nobody could remember that hash/url if he watched me sending the command. BUT: The javascript code is so long, that I got an Out-Of-Memory-Exception on the netduino+. Do you have some ideas how to solve that problem, or how to protect my netduino-html-page with a password? Thank you very much! LordOfTheFlakes
Please correct my wrong English! ;)

#2 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 15 June 2012 - 10:11 PM

Hi there, I'm new here and just received my first netduino+.

Until now I wrote a code that provides a webserver which can get information from the browser throug the request (on loading the page). -> When you watch the request you can see there is the path which I use as command (ex. www.google.com/command1)

I start a pc over WOL by opening a special link (ex. www.mydomain.com/wolStartNow).
The problem is that EVERYBODY can open the link and start my pc!

So I would like to protect access by password.
But, (don't forget I'm a netduino and c# beginner) I can't use php on netduino+. Or do I?

So, I tried one thing: Using a javascript code that hashes a username and password from a html-form. The generated hash is the command. Nobody could remember that hash/url if he watched me sending the command.

BUT: The javascript code is so long, that I got an Out-Of-Memory-Exception on the netduino+.

Do you have some ideas how to solve that problem, or how to protect my netduino-html-page with a password?

Thank you very much!
LordOfTheFlakes


I was going to change the world, then I discovered Netduino.
The world will have to wait.

#3 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 16 June 2012 - 04:24 PM

http://en.wikipedia...._authentication That'll work, then you'll be prompted by the browser for a username and password.

#4 LordOfTheFlakes

LordOfTheFlakes

    Member

  • Members
  • PipPip
  • 25 posts

Posted 16 June 2012 - 08:58 PM

@Bainesbunch: What's that? Why do you quote me? :huh: Did you have the same question and I don't know that you signalize that by quoting me? B) @ColinR: Thank you for the hint, I will try to find out more about that the next days! ;) LordOfTheFlakes
Please correct my wrong English! ;)

#5 mdce4

mdce4

    New Member

  • Members
  • Pip
  • 3 posts

Posted 27 November 2012 - 08:56 PM

I have the same question. I'm just a beginner with .netmf and C#. I was able to follow the examples in the book "getting started with the internet of things" to get the netduino setup as a webserver. Its working now using Yaler, but there is no protection on that webpage. How do I go about adding a user/password to secure the webserver so that it is protected? Thanks

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 November 2012 - 09:23 AM

Hi mdce4,

I was able to follow the examples in the book "getting started with the internet of things" to get the netduino setup as a webserver. Its working now using Yaler, but there is no protection on that webpage. How do I go about adding a user/password to secure the webserver so that it is protected?

If you want to PM community member Cuno, he's the expert on this topic...

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.