PDA

View Full Version : yetanotherforum


estuffs
03-19-2009, 08:28 PM
Hi, new to YAF, trying to install to my localhost (http://localhost/store/forum/) but cant figure out where to put the dbconn string in the web.config. Anyone installed YAF and can help me out?

I grabbed the same configuration string from my root web.config...
<add key="DBConn" value="data source=JASONXP\SQLEXPRESS;initial catalog=store;user id=JASONXP\ASPNET;password=xxxxx;integrated security=SSPI;persist security info=True;packet size=4096" />
where exactly do I put this text?


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

<yafnet configSource="yafnet.config"/>
<rewriter configSource="urlrewriter.config"/>

<system.web>
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intel ligencia.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>
<customErrors defaultRedirect="error.aspx" mode="RemoteOnly"/>
<!--trace enabled="true" pageOutput="true"/-->
<xhtmlConformance mode="Legacy"/></system.web>


</configuration>

raymondp
03-20-2009, 01:22 AM
It should be in the <connectionStrings> element in the web. config file.

<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />
</connectionStrings>

Here's a link that discusses more about this element. http://msdn.microsoft.com/en-us/library/bf7sd233.aspx

estuffs
03-20-2009, 01:03 PM
Thx... Im getting this error now... from what I understand, authtication cannot be done at the root and sub dir, which is where i have both of my web.config... so whats the solution? I tried moving the below <authenication> tags (as is) from the sub to root web.config file but then it gave me an error saying cannot be more then 2 forms.


Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 23:
Line 24:
Line 25: <authentication mode="Forms">
Line 26: <forms name=".YAFNET_Authentication" timeout="525600" />
Line 27: </authentication>


Source File: C:\Inetpub\wwwroot\AspDotNetStorefront\Web\forum\w eb.config Line: 25

Elrinth
10-13-2009, 07:11 AM
I am having same problem. Has anyone solved it?
<authentication mode="Forms">
<forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies"/>
</authentication>