YAFLogo

jgok
  • jgok
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Hi

I am trying to set up YAF on my local machine and have been following the installation read me that came with my download,

i have the application in a Data Directory just above the root (not of ISS but to the root of the drive) and have made the change in the config as stated in optional step 4B

I have set up an empty database and give the Application a connection string that should work with no problems

However when i got to http://localhost:/YetAnotherForum.NET/install/default.aspx

i just get a server error with the title:
serviceLocator cannot be null

I uninstalled everything and tried again and it worked but have a diffrent error now but will open a new topic for it
Sponsor

squirrel
9 years ago
Please verify the db.config file - in the line with your active database connection string, please verify that the following parameter:
 providerName="System.Data.SqlClient"[/code] is present at the end of that line.  

Sample (replacing values in double-braces as needed depending on your configuration):
[code=xml]
<connectionStrings>
  <!-- <add name="yafnet" connectionString="data source=(local);initial catalog=yafnet;integrated security=SSPI" /> -->
  <add name="yafnet" connectionString="server={{name_or_ip}};User Id={{database_user}};Password={{database_password}};Trusted_Connection=False;database={{database_name}};timeout=300;" providerName="System.Data.SqlClient" />
</connectionStrings>

This above connection string (with proper values) will work with SQL 2005 (standard or express), SQL 2008 (standard or express), and should work in SQL 2012 (but not tested).

If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
jgok
  • jgok
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Hi Thanks for replying

I can confirm that my connection string already has the providername parameter, my connection string is slighty diffrent but i have used it before with a diffrent database without issue

Here is my connention string (with the personel details blanked out for obviouse reasons haha)



So does this error diffinatly mean that there is a problem with the Database connection or could it be something else?
jgok
  • jgok
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
I found something else

The error message i was getting was when i was trying to view the page in my browser without any debuging

when i ran the website from VS (2010) i get the error message:


serviceLocator cannot be null
Parameter name: serviceLocator

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: serviceLocator cannot be null
Parameter name: serviceLocator

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentNullException: serviceLocator cannot be null
Parameter name: serviceLocator]
YAF.Types.CodeContracts.ArgumentNotNull(T obj, String argumentName) +100
YAF.Types.Interfaces.IServiceLocatorExtensions.Get(IServiceLocator serviceLocator) +52
YAF.Classes.Data.MsSqlDbAccess.get_Current() +42
YAF.Install._default.Page_Init(Object sender, EventArgs e) +31
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnInit(EventArgs e) +91
System.Web.UI.Page.OnInit(EventArgs e) +12
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480





This is becoming rather urgent that I manage to get this up and running within the next couple of weeks so any help is appreciated

Thanks
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
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