Set Authentication mode for admin folder

HI,

In octopus, I can setup authentication mode global for application


However, how I can set authentication mode for my admin folder, which is child folder of the root?

Best regards,
Andrey.

Hi Andreyutka,

Thanks for getting in touch! After enabling the desired authentication option such as Basic as per the documentation you can then use web.config files to set authorization rules for a folder.

You can either specify the rule in the root web.config file or create a web.config file for a particular folder. The following is an example of adding a rules to the root config file.

<configuration> 		 
	<location path="Admin">
		<system.web> 
			<authorization> 
				<allow roles="Admin"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
</configuration>

Here the path attribute is used to restrict to scope of the rule to the Admin folder. For more examples, the article Setting authorization rules for a particular page or folder in web.config is a helpful resouce.

For more information about IIS Authentication please refer to the IIS Authentication MSDN article.

Hope that helps!

Daniel

Thanks