Trouble installing on Jodohost - MSSQL connection error

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/2/2007 9:04:03 AM
Gravatar
Total Posts 14

Trouble installing on Jodohost - MSSQL connection error

Here is my page while trying to install a mojoPortal site:

Welcome to mojoPortal Setup

Probing system...
File system permissions ok.
The system cannot connect to the MSSQL database. Please check your connection string.

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at mojoPortal.Data.dbPortal.DatabaseHelper_GetConnectionError(String overrideConnectionString)

This site appears to be running in a secured environment using Medium Trust policy or lower.

Server Error in '/' Application.
Session state has created a session id, but cannot save it because the response was already flushed by the application.
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.Web.HttpException: Session state has created a session id, but cannot save it because the response was already flushed by the application.
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:

[HttpException (0x80004005): Session state has created a session id, but cannot save it because the response was already flushed by the application.]
System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded) +2220274
System.Web.SessionState.SessionStateModule.CreateSessionId() +55
System.Web.SessionState.SessionStateModule.DelayedGetSessionId() +64
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +328
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832[/quote]

It looks like my connection string in the web.config is not written correctly, but I am not sure what I am doing wrong. Ticket system here at Jodo simply replied with a link to www.connectionstrings.com but no help as to which of those examples would help me out. Here is a copy of the connection string from my web.config:

<add key="MSSQLConnectionString" value="server=(64.71.***.*);UID=*******_admin;PWD=********;database=*******_mojodb" />
<add key="MSSQLOwnerPrefix" value="[dbo]." />

Jodo support has told me that my connection string should be like this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Can anyone help me out?

12/2/2007 9:28:00 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Hi,

Looks like you are running in Medium Trust. Are you using the special download configured for medium trust? If so you should put your connection string in the user.config file instead of the Web.config. If user.config file is present, appSettings placed there will override settings in Web.config.

However, note that when you make a change to user.config ASP.NET does not automatically pick it up because its not monitoring that file for changes. So you have to modify the Web.config by typing a space in it or something after you make changes to user.config, then it will pick up your changes to user.config.

So my best guess is user.config is present and has an incorrect connection string which is overriding the correct one you set in Web.config. Update user.config with your connection string and it should work.

Hope it helps,

Joe

12/2/2007 9:52:26 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

Thanks for the reply. I am not using the Medium Trust download because i didn't know I needed it before this step. Thus I don't seem to have a user.config file anywhere.

Do I have to replace the entire web content with the medium trust version or can I just add/overwrite the different config files? If so, what are they?

Either way, the recommended connection string from Jodo (Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;) should go into the user.config and don't worry about the one in web.config, right? I am not an asp/.net coder and am trying to wrap my PHP/mySQL brain around this CMS. What is the syntax I need to do with the Jodo recommended connection string to make it work in the user.config?

I hope I am not overstepping with my questions, thanks again for your time.

12/2/2007 9:57:59 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Hi,

Yes I think you should replace all the files as there was a bug in 2.2.3.9 under medium trust which is why I put up the preview of 1.2.4.0 for medium trust.

However, there does seem to be something wrong in your connection string if user.config is not currently present. You can set ShowConnectionErrorOnSetup to true in Web.config if its not already true and maybe more detail about the connection error will be shown.

Hope it helps,

Joe

12/2/2007 10:00:39 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

I am uploading the new release now, and will attempt to setup soon. I will let you know what happens, thank you.

12/2/2007 10:01:22 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Oh and yes I would put your connection string in user.config

There are various connection string syntaxes that work. The one jodohost recommends looks fine to me, though the syntax already there should work also if the crednetials are correct.

Hope it helps,

Joe

12/2/2007 10:27:49 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

OK, new release uploaded and the db connects just fine, however.. still getting the session error:

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema needs to be created.


Server Error in '/' Application.
Session state has created a session id, but cannot save it because the response was already flushed by the application.
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.Web.HttpException: Session state has created a session id, but cannot save it because the response was already flushed by the application.

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:

[HttpException (0x80004005): Session state has created a session id, but cannot save it because the response was already flushed by the application.]
System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded) +2220274
System.Web.SessionState.SessionStateModule.CreateSessionId() +55
System.Web.SessionState.SessionStateModule.DelayedGetSessionId() +64
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +328
System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs) +152
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

12/2/2007 10:31:06 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

Actually, when I completely edit the user.config (sorry, to anxious to read the WHOLE file) I get this error:

An Error Occurred:Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source:mscorlib
Stack Trace at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at mojoPortal.Business.WebHelpers.WebPartHelper.GetWebPartsFromAssemblies() at mojoPortal.Web.mojoSetup.RunningInFullTrust() at mojoPortal.Web.UI.Pages.SetupHome.ProbeSystem() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

12/2/2007 10:37:33 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

I don't know what you mean by completely edit the user.config file. Only things from the appSettings section of Web.config can be entered in user.config, not the whole file.

Hope it helps,

Joe

12/2/2007 11:06:52 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

I also edited the key="Lucene.Net.lockdir" line, and now have the error at setup from my 11:31am post.

12/2/2007 11:14:16 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Please type a space in the Web.config and re-upload it this should recycle the application. If your control panel has a tool to recycle also use that. Then visit yoursiteroot/Setup/Default.aspx

If you get an error again post more of the error message.

Use of System.Reflection is not supported under medium trust but this code is not called from the setup page so I don't know why its throwing this exception. System.Reflection is used only for loading WebParts from dlls in the bin but this code should not be getting invoked unless you are in WebPart Administrator page.

Joe

You must sign in to post in the forums. This thread is closed to new posts.