---
title: "authorization på mappar"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/66152-authorization-på-mappar"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "cyprys"
published: "2003-01-26T02:00:46.000Z"
updated: "2003-01-26T12:57:20.000Z"
replies: 4
views: 246
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/dotnet/66152-authorization-på-mappar"
---

# authorization på mappar

## #1 — cyprys, 2003-01-26T02:00Z

Denna kod funkar bra på filer.
Men om jag skulle vilja sätta på en hel mapp så vill det inte. Varför?

```
<forms name="Books" loginUrl="index.aspx" protection="All" path="/" />

......

<location path="fil.aspx">
		<system.web>
			<authorization>
				<deny users="*" />
			</authorization>
		</system.web>
</location>
```

Permalänk: https://www.webforum.nu/p/66152

## #2 — renholm, 2003-01-26T11:32Z

Ska det inte gå att lägga en web.config i din undermapp med säkerhets inställningarna bara?

Permalänk: https://www.webforum.nu/p/927492

## #3 — cyprys, 2003-01-26T11:53Z

Har lagt denna i web.config i den mappen jag vill skydda.

```
<system.web>
			<authentication mode="Forms">
				<forms name="Books" loginUrl="index.aspx" protection="All" path="/" />
			</authentication> 
	  
			<authorization>
				<deny users="?" />
			</authorization>
		</system.web>
```

Kan fortfarande bläddre för fullt.

Permalänk: https://www.webforum.nu/p/927507

## #4 — andreas_lindh, 2003-01-26T12:41Z

prova att sätta path till path="" . Så har jag gjort och det fungerar för mig

Permalänk: https://www.webforum.nu/p/927544

## #5 — cyprys, 2003-01-26T12:57Z

Nope. Funka inte.. Har testat lite möjliga och omöjliga lösningar  nu.. Så här ser min web.config ut som ligger i mappen som jag vill skydda.

```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

		<system.web>
			<authentication mode="Forms">
				<Forms name="AuthCookie" loginUrl="index.aspx" protection="All" path="" />
			</authentication> 
		</system.web>
			 
	<location path="">
		<system.web>
			<authorization>
				<deny users="?" />
			</authorization>
		</system.web>
	</location>
</configuration>
```

Något som inte verkar stämma?

Permalänk: https://www.webforum.nu/p/927558

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/66152-authorization-på-mappar
