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.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> <customErrors defaultRedirect="error.aspx" mode="RemoteOnly"/> <!--trace enabled="true" pageOutput="true"/--> <xhtmlConformance mode="Legacy"/></system.web> </configuration>
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
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\web.config Line: 25
I am having same problem. Has anyone solved it? <authentication mode="Forms"> <forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies"/> </authentication>