How To Sort Users On Login to IIS?

I am putting up a small IIS local site on a machine on our home LAN.

I enabled authorisation and now all comers must log in with a username and password known to my machine.

That’s fine.

But then they all land on the same page.

All I can think of is to have a php script that asks them for another log in and then sends them off to their own pages after that. But that’s a bit of a nuisance for them, having to log in twice.

It seems what I need is something called a ‘dynamic’ IIS site and googling I found some mention but not enough to enable me to fix my problem.

Can anyone help?

This is IIS on Win10.

Can you explain a bit more about what exactly you want to achieve with your local site and what do you mean by landing on the same page? Your question is too vague to answer.


Landing on the same page: this means that when inputting the url for my site you will get first an authorisation screen where you put in a username and password.

That being successful you’ll be looking at index.html in my wwwroot folder of my inetput folder on my C: drive.

That page.

What exactly I want to achieve:

After you’ve logged in successfully I would like you to go to a page set up just for you… coderboy.html in the wwwroot directory of inetpub of C:

And when someone else logs in: say, ‘Jim’, I’d like him to go to a page I’ve set up for him: jim.html in the wwwrott directory of inetpub of C:

How come I got no notification of your reply?

It says I will receive notifications because I created the topic. But I got nothing.

What’s your backend or server code? You said you could include a php file for the authentication, is your project PHP based? Or ASP.Net? This is necessary because, the dynamic request handling to serve different pages for different users is done by a backend service.

Also, what are you using for authentication? Windows login or form based? I assume it’s Windows since you mentioned username and password known to my machine. But just to be sure.

For your information, form based means creating a custom form for username/password which is then checked with your database for authentication. And, Windows based is by using your Windows credentials. This is necessary because the way you retrieve the username is different for forms and windows based.

I don’t know whether my project is php or based. Sounds ridiculous to you? Well it is because I simply have a standard IIS installation on win10 here which I have used for years simply to test my sites before uploading them to their hosts.

Now I decide to open my machine to family and get a static IP for that purpose.

And I write an index.html page as a landing page.

Then I look for password protection and decide the inbuilt IIS authentication would be best so I enable it.

Then I realise that if I’m going to sort people out with a script of my own (which would be php I guess seeing I know at least a little bit about it - and nothing about anything else) then they’ll be inputting usernames and passwords twice which will be a real drag.

That’s it. that’s up to date. That’s all I’ve done and where I’m at.

I’m thinking now I can switch on this ‘form based’ authentication and the windows authentication will switch off and all will be done by the form I provide, right?

I can use php to make that form?

‘checked with my database’ ? you mean I have to put up a mysql database and populate it before this can work? form based obviates windows account usage? people will no longer be able to log in with their user accounts I have set up on this machine?

p.s. I’m thinking this question about php based or whatever is perhaps important, is it? I have a static or something site right now apparently from the googling I’ve done and I think I need to change some configuration perhaps if I want the site to be what they call ‘dynamic’ - so’s it will serve out different pages to different people. Is this right?

Sorry for the late reply.

###To answer your question
If you have just a static website and you want different users to access different pages, what you can maybe do is:

  1. Create subdirectories for each user. So, you can create your-website/coderboy and your-website/jim.
  2. You can set different logins for each sub directory. You can use Authorization Rules to do this.
  3. You can display general information on the main index.html. Maybe links to individual user pages.

###Other answers:

  1. If you want a dynamic website, you can do that with either ASP.Net or PHP or any other server side language you please.

  2. You can have both Windows and forms based auth in conjunction, but it complicates the matter. Check this article if you want to implement such for ASP.Net

  3. If you still want the Windows Auth, go for ASP.Net, it supports it out of the box and, you don’t have to have a database like MySQL to check the usernames/password. This is similar to what you have right now, it works with your windows login. You can also create Forms based authentication with ASP.Net. Check the Getting started guide for ASP.Net.

  4. If you want to use PHP, I don’t know if you can use Windows Auth service, most probably you can. But, you would need to implement it yourself. You can have Forms based authentication by creating a form, validating it with the credentials stored in the database (MySQL) and based on the user, redirect them to their pages.

My personal opinion for you would be to choose ASP.Net for dynamic sites with IIS

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.