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

12/2/2007 11:17:49 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Also if you had any problems while uploading the new files try doing it again one folder at a time to make sure all the files got replaced. Also delete Janrain.dll from the bin folder if it is there from your previous upload of 2.2.3.9

Joe

12/2/2007 11:36:39 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

OK, new user.config and new web.config files are uploaded... now the setup page just hangs and comes back not responding eventually. :( GRRR!

12/2/2007 11:42:12 AM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

OK, closed browser, walked away and came back. Usually fixes all 'hanging' problems and sure enough it did. Here is my current error:

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

 

I have made sure the web.config and user.config are new and uploaded, and the Janrain.dll was deleted already. Any idea?

12/2/2007 11:50:27 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

I have not encountered that error before. The setup page uses Response.Buffer, Response.Write and Response.Flush to update the page as things progress and the Flush is apparently causing some error in saving session state. But session state is not used in mojoPortal so if your control panel has a way to turn that off maybe it can get past this error and complete the setup. Its anIIS setting, not sure if its exposed to you in your control panel.

I do not get this error when I run in medium trust locally. Maybe I can try to cause it by configuring session state and see if I can trap that error. I'm heading out for the afternoon for a family get togather though.

Joe

12/2/2007 4:59:03 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

The plot thickens....

I get the above mentioned error from Firefox, but I get a completely different error from IE:

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

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)

 

Now I am REALLY confused.

12/3/2007 10:00:11 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Hi,

Well this is the same error as in one of your previous posts.

The good news is I'm able to replicate this problem here in IIS on Vista. Since this error didn't used to happen under medium trust I can only guess its a tightening of security either in IIS7 or in the recent service pak for the .NET framework.

I'm looking into it now and will post again as soon as I have a solution. I will follow up with a new package for medium trust that can get past this exception.

Thanks,

Joe

12/3/2007 11:04:08 AM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

I have this fixed locally. I will upload a new package of files later today and post again when its available.

Thanks,

Joe

 

12/3/2007 3:20:24 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

Well I can't tell you how good it feels to know that it's not just me and that I am going crazy or something. As of this afternoon, I am getting the same error message in IE and Firefox (the source=mscorlib) and am awaiting your new package...

Will I have to upload the whole site again?

12/3/2007 3:43:12 PM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

Ok, the new package is ready to download on our download page. I made one package but easy instructions to change to medium trust configuration. Its in the Readme.txt but is as follows:

Set your connection string in the user.config file

If your site is hosted in Medium Trust:

1. delete the JanrainRain.OpenId.dll from the bin folder
2. Rename the Web.config to Web.config.old
3. Rename Web.config.mediumtrust to Web.config
4. Set RunningInMediumTrust = true in user.config

You can safely skip on re-uploading the Data folder and the ClientScript folder, those are 2 big folders so that may help. To be on the safe side I'd upload all the rest.

The download package is named mojoportal-2-2-4-0-preview-mssqlreleasefiles.zip

Should work better this time. Let me know how it goes.

Best,

Joe

12/3/2007 4:13:16 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

Followed your instructions, and also had to update the (<add key="Lucene.Net.lockdir" value="D:\hshome\rozecommsp\mojo.rozecomm.com\Data\Sites\1\index" />) line in web.config, but it installed no problem and quickly I might add. Thank you for working with me on this, I am sure I will be back with other questions soon. :)

12/3/2007 4:21:09 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

OK, error trying to 'edit' the homepage content:

We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.

Where is this error logged, and what did I forget to do?

12/3/2007 4:34:13 PM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

The error log is located at /Data/currentlog.config or you can view it also by clicking the key icon which goes to admin menu and click the link for server log.

My best guess is an error trying to index the content into the search index. Lucene.NET is troublesome under medium trust. It works in my environment under medium trust but sometimes hosted envrionments are really a variation on medium trust. If worse comes to worse you can disable the search by deleting all files except 000_placeholder.config from under Setup/indexbuilderconfig

Hope it helps,

Joe

12/3/2007 5:33:54 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

Seems that EVERYWHERE I try to edit text on the site, I got the same error... worse, the log file doesn't show anything about the errors either. I cleared the log and then closed browser, reconnected, caused errors, checked log - no entries. That's something you might want to check out.

I removed the files you suggested and I can now edit content. Without those files, what functionality have I lost?

12/3/2007 5:42:03 PM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

The search feature is the only thing lost by removing those files. Does the folder /Data/Sites/1/index exist? If not create that folder and make sure its writable and then try restoring those files, then do a search to initialise the index, then try editing.

I'll try some more experiments here tomorrow and see if I can figure out a solution. If you get any good error message post it. It should work in medium trust, that setting about the folder location is usually all thats needed to get it working.

Hope it helps,

Joe

12/3/2007 6:12:26 PM
Gravatar
Total Posts 14

Re: Trouble installing on Jodohost - MSSQL connection error

The folder /Data/Sites/1/index/ does exist, but CHMOD had no effect on the search function working. Also, trying to add the 'Incident Log' feature also causes the mentioned error. Nothing is being logged though.

12/3/2007 6:21:14 PM
Gravatar
Total Posts 18439

Re: Trouble installing on Jodohost - MSSQL connection error

oops Incident Log should not show up in the feature list. Its because I inadvertantly included the config files for a feature I'm working on for one of my customers. Please delete the extra folders. Under /Setup/applications you should only have

mojoportal-core
pollfeature...
surveyfeature
webstore

any others can be deleted. I'm fixing the download now to remove those. Its only configuration files in those folders the features are not included. You will have to delete the bad ones from Administration > Site Settings > Feature Modules after deleting the config files.

Thanks,

Joe

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