Bit of a struggle getting mojo working on SqlCE

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.
8/15/2010 5:26:00 PM
Gravatar
Total Posts 116

Bit of a struggle getting mojo working on SqlCE

Wanted to get my first SqlCE site up and running tonight but ran into several problems that seemed to take a long time to solve in conjunction with the hosting company.  Got it all working in the end but not knowing a huge amount about IIS I wanted to check it was OK .......

I downloaded and unzipped 2-3-5-1 and uploaded it then set the permission on App_Data and Data to be writeable by IIS_WPG and Network Service - tried that and got file permissions OK but access denied (mscorlib error).  Noticed the readme in the download file and also added the application identity to it but got the same error.  I spoke with the hosting company and also noticed some asp errors in the event log/application section.  They re-registered asp.net 4.0 and then added full permissions to ASP.NET and Modify permissions to Network and Network Service users and then it all seemed to work fine, the identity on the application user seems to just have List Folder Content rights.....

The server is running on MS2003 and IIS 6.0 with full details below.  It is all working fine now but I just wanted to check whether this setup was acceptable and pass this info on to anyone else who experiances the same.  It may all have been caused by the whole asp.net 4.0 apparently needing registering again (although my other mojo sites were running fine during this period as I checked them!?)

mojoPortal Version 2.3.5.1 SqlCe
Operating System Microsoft Windows NT 5.2.3790 Service Pack 2
ASP.NET Version v4.0.30319 Running in Full Trust
Server Time Zone GMT Daylight Time
Server Local Time (GMT 1) 15/08/2010 23:22:38
Greenwich Mean Time (GMT/UTC) 15/08/2010 22:22:38

Thanks for the great work on this Joe, having been through the process once I can hopefully get mojo sites up and running faster than ever now! :-)

Regards

Andrew

8/16/2010 9:20:56 AM
Gravatar
Total Posts 2169

Re: Bit of a struggle getting mojo working on SqlCE

Hi Andrew,

Are you on shared or dedicated hosting? If you are on shared hosting, I am concerned for the security of your site. You stated that your site is now configured with full permissions for the ASP.NET user and modify permissions for the Network and Network Service users. Coupling that configuration along with a Full Trust environment spells danger as other sites on the same server (presumably with the same configuration) have access to your site's data and vice-versa. You should have a unique user account assigned as the identity of your .NET Application Pool and that user should have Modify rights on the App_Data and Data directories, no other user should have this access.

If you are using dedicated hosting, I still would recommend unique identities for your application pools.

HTH,
Joe D.

8/16/2010 9:35:39 AM
Gravatar
Total Posts 116

Re: Bit of a struggle getting mojo working on SqlCE

Hi Joe,

Thanks for notifying me of this and the potential security risks.  This is on a cloud VPS system and no other sites have the same config - the MSSQL based sites have always worked fine with the setting Joe A has given - IIS_WPG and NetworkService having write access.  Can you confirm that these 2 still need the same access and in addition to set write access for the identity of your .NET Application Pool (which looks like IWPD_8(ftpxxxxxxx) - although as the server has plesk on it they appear in the permissions as Plesk IIS WP User(computer_name\IWPD_8(ftpxxxxxxx))

**I have been looking into this and I don't think IIS_WPG will need to be there as it is running on a dedicated application pool.....?

Thanks for your help,

Regards

Andrew

8/16/2010 10:04:13 AM
Gravatar
Total Posts 18439

Re: Bit of a struggle getting mojo working on SqlCE

only the identity of the application pool needs permissions, it needs read permissions on the entire web and full control on /App_Data and /Data

No other user needs permissions.

IIS_WPG is/was the default identity in IIS 6 on Win 2003 and NETWORK SERVICE is also often configured as the app pool identity (was the default in early versions of IIS 7), but no matter who the identity is configured as, that user is the only one who needs permissions for the web app to work. There are not multiple users who need permissions for the web site to run, though other users may need permissions for ftp or other purposes.

So once you know the identity user of the app pool you can set permissions for that user.

Hope it helps,

Joe

8/16/2010 10:09:05 AM
Gravatar
Total Posts 116

Re: Bit of a struggle getting mojo working on SqlCE

Thanks for the clarification Joe will alter accordingly, recycle the app pool and start and stop the site then run setup again to make sure it all works properly - I am glad you posted the additional info as I was just checking a MSSQL mojoportal site that I have running to compare permissions and it seemed to have 'lost' the IIS_WPG and Network Service permissions I set but I know it has all been working fine - your explanation saved me some time going in circles! 

Thanks to both Joe's for the assistance smiley

 

EDIT - OK reset the permissions to just he app pool ID and removed the others.  Recycled the app pool, stopped and restarted the site and ran setup again - all works fine........ I think sometimes I just like to over complicate things!! 

9/17/2010 10:28:47 PM
Gravatar
Total Posts 1

Re: Bit of a struggle getting mojo working on SqlCE

Hi All, 

 

Not sure what I am doing wrong but when I try to install the sql CE version of the software I get the following error:

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

System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'mojouser'. 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.DatabaseHelperGetConnectionError(String overrideConnectionInfo)

 

I downloaded mojoportal-2-3-5-1-mssql-net40-deploymentfiles.zip

I made app_data and DATA read/write

and I am pretty sure I followed the webmatrix instructions. 

 

Any help would be much appreciated. 

 

Thanks, 

 

W

9/18/2010 7:50:10 AM
Gravatar
Total Posts 18439

Re: Bit of a struggle getting mojo working on SqlCE

you downloaded the package for SQL Server, there is a different package for SQL CE

Hope it helps,

Joe

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