texaggie
  • Posts: 2
  • Joined: 17/02/2009
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
  • Posts: 761
  • Joined: 12/02/2005

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
  • Posts: 2
  • Joined: 17/02/2009
Are you referring to the web.config located in the /yetanotherforum folder? If so, there is already a forms authentication section. Also, "<forms loginurl="~/myloginpage.aspx" />" 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
  • Posts: 902
  • Joined: 07/01/2007
texaggie wrote:

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


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.
UserPostedImage 
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved