I've downloaded the svn / trunk and deleted the mojoportal db that was on my sql server and made a clean install of all.
I added the reference for MSSQL in MojoPortal.Business and in web.config configured the sql connecton and i've set the CacheMSSQLParameters to False.
The part of
Parameter '@SiteID' was supplied multiple times error disapeared, but the
@DefaultFriendlyUrlPattern is not a parameter for procedure mp_Sites_Insert still crashed the portal, this time when creating initial data with an empty db.
I've opened the dbPortal.cs in VS and searched the SiteSettings_Create method and compared it with the SP mp_Sites_Insert.
I noticed that when caching SQL Parameters the name of the parameter is not passed, but when not caching SQL Parameters, we have to pass the name of the parameter.
So I compared it with the SP and noticed that in line 310 the name of the parameter was @DefaultFriendlyUrlPattern, but the SP was expecting a parameter with the name @DefaultFriendlyUrlPatternEnum.
I changed that in dbPortal.cs and try to run the portal again. I got a new error
Procedure 'mp_Sites_Insert' expects parameter '@AllowPageSkins', which was not supplied.
In the SP the parameter[5] is AllowUserSkins and the parameter[14] is AllowPageSkins.
When caching or not SQL Parameters I noticed that in parameter [5] and [14] the code passes AllowUserSkins value in both places instead of passing AllowPageSkins in the [14].
When not caching SQL Parameters, the name of the parameter[14] must be changed to @AllowPageSkins instead of @AllowUserSkins.
I've also changed the value in parameter [14] that passes in both places to AllowPageSkins instead of AllowUserSkins.
When running the portal again a new error appeared.
Procedure 'mp_Roles_RoleExists' expects parameter '@SiteID', which was not supplied.
I've noticed that in line 1929-1931, when CacheMSSQLParameters is set to False, it passes the 2nd parameter in position [0] overwriting the 1st parameter.
I've fixed that and tried to run again.
This time I got an error that it's not part of the dbPortal.cs, and address a Null reference...
Server Error in '/mojoPortal' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 69: SiteSettings siteSettings = (SiteSettings) HttpContext.Current.Items["SiteSettings"];
Line 70: skinFolder = "~/Data/Sites/" + siteSettings.SiteID.ToString() + "/skins/";
Line 71: skinName = siteSettings.Skin.Replace(".ascx","") + "/layout.ascx";
Line 72:
Line 73: // implement user skins
Source File: C:\Documents and Settings\Joao\My Documents\Visual Studio Projects\MojoPortal SVN\Web\Components\MasterPage.cs Line: 71
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
mojoPortal.Web.MasterPage..ctor() in C:\Documents and Settings\Joao\My Documents\Visual Studio Projects\MojoPortal SVN\Web\Components\MasterPage.cs:71
ASP.Default_aspx.__BuildControlMPContainer() in C:\Documents and Settings\Joao\My Documents\Visual Studio Projects\MojoPortal SVN\Web\Default.aspx:3
ASP.Default_aspx.__BuildControlTree(Control __ctrl) in C:\Documents and Settings\Joao\My Documents\Visual Studio Projects\MojoPortal SVN\Web\Default.aspx:1
ASP.Default_aspx.FrameworkInitialize() in c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mojoportal\657dc34f\b4344e93\qvoin4hh.0.cs:0
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[Exception: Unhandled Exception while processing NeatUpload child request]
Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) in C:\Documents and Settings\Joao\My Documents\Visual Studio Projects\MojoPortal SVN\NeatUpload\UploadHttpModule.cs:224
System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
This time I'm a little lost... :) If you could check this one for me I'll appreciate.
I tried to TortoiseSVN Commit the dbPortal.cs with the changes I made but I've failed do authenticate. Tried to login anonymous and with this page authentication but also failed. Is it required to register somewhere or I'm I just beeing dumb! :)
Cheers
João Pereira