YAFLogo

texaggie
  • texaggie
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hi,

I have version 1.9.1.8., hosted by GoDaddy. The forum appears to be working fine. However, I want to prohibit access to the forums prior to the user logging into the forum. Currently, I've setup the Guest access to disallow read-only access, but anyone can still see the Forums layout. I want the forums to be invisible prior to login.

How can I accomplish this?

Thanks!

Sponsor
test2005
16 years ago

Try modifying your web.config file, folder access to deny anonymous access


<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
        <authentication mode="Forms">
            <forms loginurl="~/myloginpage.aspx" />
        </authentication>
        <authorization>
            <deny users="?" />
        </authorization>
    </system.web>
</configuration>

All un-authenticated users will be rediretced to "~/myloginpage.aspx" for login.

HTH

:)


.....the man in black fled across the desert..........and the gunslinger followed.....

texaggie
  • texaggie
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Are you referring to the web.config located in the /yetanotherforum folder? If so, there is already a forms authentication section. Also, "" line refers to a non-existent file. Is this just an example reference, or should myloginpage.aspx actually exist?

I've included my revised web.config below that did not work. Any other suggestions? Thanks!


<?xml version="1.0"?>
<configuration>
	<configSections>
		<section name="yafnet" type="yaf.SectionHandler,yaf"/>
		<section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
	</configSections>

	<yafnet configSource="yafnet.config"/>
	<rewriter configSource="urlrewriter.config"/>
 
	<system.web>
		<httpModules>
		<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter" />
		</httpModules>    
		<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
		<compilation defaultLanguage="c#" debug="false"/>
		<pages enableEventValidation="false" validateRequest="false" smartNavigation="false"/>
<!--
		<authentication mode="Forms">
			<forms name=".YAFNET_Authentication" timeout="525600" />
		</authentication>
-->
		<authentication mode="Forms">
			<forms loginurl="~/myloginpage.aspx" />
		</authentication>
		<authorization>
			<deny users="?" />
		</authorization>
		<customErrors defaultRedirect="error.aspx" mode="RemoteOnly"/>
		<!--trace enabled="true" pageOutput="true"/-->
		<xhtmlConformance mode="Legacy"/>
	</system.web>
</configuration>
Ederon
  • Ederon
  • 100% (Exalted)
  • YAF Developer
16 years ago

Are you referring to the web.config located in the /yetanotherforum folder? If so, there is already a forms authentication section. Also, "" line refers to a non-existent file. Is this just an example reference, or should myloginpage.aspx actually exist?

texaggie wrote:

It is just an example.


When I post FP:Ederon in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting.