Autor Beitrag
jg72
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Do 11.08.11 11:23 
Hallo Zusammen,

ich entwickle gerade ein neues Projekt, welches einige Seiten für alle Verfügbar hat und andere nur für angemeldete Benutzer. Die Zugriffskonrolle hierbei ist per Forms-Authentification regelt und funktioniert auch soweit.

Während der Entwicklungs- und Testphase würde ich gerne die Seiten schon veröffentlichen, aber mit einem "Masterpasswort" schützen. Man soll sich also mit diesem Kennwort anmelden, kann dann die öffentlichen Seiten ansehen und muss sich dann mit einem Benutzerkonto anmelden um dann die restlichen Seiten zu erreichen.

Kann man sowas erreichen? Der Server (IIS 7) ist von mir administrierbar.

Vielen Dank schonmal,
Jürgen
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 11.08.11 13:03 
Wie wäre es mit .htaccess Dateien? Das sollte doch passen, oder?
jg72 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Do 11.08.11 14:08 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
Wie wäre es mit .htaccess Dateien? Das sollte doch passen, oder?

.htaccess wäre super, so mache ich das bei anderen Projekten mit dem Apache-Server. Funktioniert das so ohne weiteres auf dem IIS?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 11.08.11 14:13 
Nein, aber es gibt eine ähnliche Alternative:
learn.iis.net/page.a...nt-to-iis-webconfig/
jg72 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Do 11.08.11 16:51 
Ich habe in der Web.config ja schon eingestellt, dass ich die Forms-Authentifizierung nutze. In etwa steht da:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<system.web>
        <authentication mode="Forms" >
            <forms name="Irgendwas" loginUrl="Login.aspx" timeout="20" />
        </authentication>

        <authorization>
            <allow users="*"/>
        </authorization>
</system.web>

<location path="Members">
        <system.web>
            <authorization>
                <allow users="?"/>
                <deny users="*"/>
            </authorization>
        </system.web>
</location>


Jetzt will ich darüber noch irgendeine Form des Zugriffschutzes legen, der immer vorher abgefragt wird, man also unter Umständen zwei (verschiedene) Benutzernamen und Kennwörter eingeben muss. Da bin ich dann überfordert, ob und wie ich das in die Web.config eintragen kann.