SoftSupport
2009-04-09T22:44:47Z
Hi!

I'm getting the following message during installation and just can't figure out whats wrong:

Connection failed. Modify web.config and try again.

The erros message was:

Login failed for user '<username>'.


I've tried to logon with several users, so it's not a wrong password.

Here is my web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<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>
<system.webServer>
<modules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<connectionStrings>
<add connectionString="Server=BYSS;Database=yetanotherform_RAG;User ID=<User>;Password=<password>" name="RAG" />
</connectionStrings>
</configuration>


And my yafnet.config file:

<yafnet>
<connstr>user id=<User>;pwd=<password>;data source=BYSS;initial catalog=YetAnotherForum_RAG;timeout=90</connstr>
<uploaddir>~/upload/</uploaddir>
<boardid>1</boardid>
<!-- Enable URL Rewriting -->
<enableurlrewriting>true</enableurlrewriting>
<!--logtomail>email=;server=;user=;pass=;</logtomail-->
<!--categoryid>1</categoryid-->
<!-- Enable these to use a custom user class "provider" -->
<!--CustomUserAssembly>TinyGecko.YAFIntegration.dll</CustomUserAssembly>
<CustomUserClass>TinyGecko.YAFIntegration.yafUserClass</CustomUserClass-->
</yafnet>


I'm thankful for any help!

Cheers,

Gerrit
Sponsor
jshepler
2009-04-10T00:16:55Z
That is a SQL error - the user id in your connection string (in yafnet.config) isn't a user in the database or doesn't have sufficient access rights.

On a side note, you should never post passwords. If those are the actual passwords, I would suggest you change those immediately.

not jsheLPer
SoftSupport
2009-04-10T01:14:32Z
jshepler wrote:

That is a SQL error - the user id in your connection string (in yafnet.config) isn't a user in the database or doesn't have sufficient access rights.

On a side note, you should never post passwords. If those are the actual passwords, I would suggest you change those immediately.



Thanks for the advice. Though I do believe that at least one of the users I tested had all possible permissions.

Opps, missed that one! Thanks for pointing it out. Passwords been changed! 🙂
SoftSupport
2009-04-14T00:16:27Z
jshepler wrote:

That is a SQL error - the user id in your connection string (in yafnet.config) isn't a user in the database or doesn't have sufficient access rights.

On a side note, you should never post passwords. If those are the actual passwords, I would suggest you change those immediately.



OK, I've checked the access rights and made sure the user account all permissions. Still getting the same error! :cry:

My guess is I'm missing some little detail, but as I'm an Exchange-expert and not an SQL-expert I don't know where to look...
jshepler
2009-04-14T04:50:14Z
SoftSupport wrote:


OK, I've checked the access rights and made sure the user account all permissions. Still getting the same error! :cry:

My guess is I'm missing some little detail, but as I'm an Exchange-expert and not an SQL-expert I don't know where to look...



In sql manager, connect to the server, expand security/logins and verify the user specified on yafnet.config's connection string is there. Then double-click it, select User Mappings on the left and make sure the database containing yaf is checked. That will automatically put that user into the database role "public" and should be sufficient for yaf access.

not jsheLPer
SoftSupport
2009-04-14T07:16:06Z
Originally Posted by: jsheplerIn sql manager, connect to the server, expand security/logins and verify the user specified on yafnet.config's connection string is there. Then double-click it, select User Mappings on the left and make sure the database containing yaf is checked. That will automatically put that user into the database role "public" 



Ok, I just deleted my entire Site and started from scratch. I did the SQL-settings as you just told me and still the same error! 😶

Could the problem be related to Windows 2008 and SQL 2005?

jshepler
2009-04-15T07:37:07Z
SoftSupport wrote:


Ok, I just deleted my entire Site and started from scratch. I did the SQL-settings as you just told me and still the same error! 😶

Could the problem be related to Windows 2008 and SQL 2005?



I don't know anything about windows 2008, but I wouldn't think so. The error is a sql server error, not a windows error. Can you verify the credientials by using them to connect to the database from something else - say sql manager itself (instead of integrated)?

not jsheLPer

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