local installation/ create user

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/24/2009 5:37:39 PM
Gravatar
Total Posts 18

local installation/ create user

I feel pretty dumb asking this, I should be something striaght forward, but i cant seem to create a user in the mojo database that the setup is able to connect to.

error message: System.Data.SqlClient.SqlException: Login failed for user 'mastermojo'.

I have been trying for a few hours now, and getting nowhere.

not sure if its possible to see what I am doing wrong with the script below, or is there a guide somewhere to creating a user.

USE [mojo]
GO

/****** Object: User [mastermojo] Script Date: 05/24/2009 22:47:19 ******/
CREATE USER [mastermojo] FOR LOGIN [mastermojo] WITH DEFAULT_SCHEMA=[dbo]
GO

=====================================================

my local MS SQL Server is using Windows Authority (i think this maybe the issue?)

The problem I think seems to be that the user mastermojo cant seem to log onto the local sql server.

I get the exactly the same message (Login failed for user 'mastermojo'.) when i try connecting to the sql server using SQL Server Authentication with the user mastermojo (as opposed to how i normally connect which is Windows Authentication)

 

windows xp pro, iis 5.1

sql server express 2008

mp 2304b

5/24/2009 11:37:50 PM
Gravatar
Total Posts 131

Re: local installation/ create user

If your connection string is correct, integrated security should not be an issue.  Are you sure the user is created in SQL Server and assigned dbo access to the db?

Go to SQL Server Explorer, security, logins, right click the user, select properties.  In the window that comes up, select user mapping and make sure your user has a checkbox checked next to your mojo db.  in the second box, select db_owner.

 

 

 

5/25/2009 6:24:17 AM
Gravatar
Total Posts 18

Re: local installation/ create user

yeah user is set up as you explained and im stilll getting the same error.

 

connection string:

<add key="MSSQLConnectionString" value="server=HOMELEX\SQLEXPRESS;UID=mastermojo;PWD=mastermojo;database=mojo" />

error:

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

System.Data.SqlClient.SqlException: Login failed for user 'mastermojo'. 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) in D:\A_Project_code\mojo\sourcecode\mojoportal\mojoPortal.Data.MSSQL\dbPortal.cs:line 349

5/25/2009 9:41:40 AM
Gravatar
Total Posts 550

Re: local installation/ create user

Hi

When you use Windows Authentication Mode , you don't must specify a SQL SERVER login. In this mode SQL SERVER use the build in user NT AUTHORITY\NETWORK SERVICE. So if you set your connection string like

<add key="MSSQLConnectionString" value="Data Source=yourserver;Initial Catalog=yourDatabase;Integrated Security=True" />

and in security section of the SQL SERVER , see the properties  then User Mapping of NT AUTHORITY\NETWORK SERVICE  and check the map checkbox for your database and in the Database roles membership section that you see for your database check db_owner and public checkboxes. I test it and all things work good.

I hope helps you.

Best

Asad

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