mojoPortal project DB login fail

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.
1/28/2012 1:56:30 PM
Gravatar
Total Posts 4

mojoPortal project DB login fail

Hello,

I am attempting to run a local instance of mojoPortal via Visual Studio Web Weveloper 2010 Express. Unfortunately when I attempt to run the project I get an error saying "login failed for user 'mojouser'". I believe I have followed the tutorials from youtube and this site exactly, so I am trying to figure out if my connection string is incorrect, or if there is a setting of my database I need to know about. It is SQL Server 2010 Express.

I have listed the class that generates the exception, the error listed, and my connection string.

SQLParameterHelper.cs: login failed for mojouser.

<add key="MSSQLConnectionString" value="server=localhost\SQLExpress;UID=mojouser;PWD=mojo123;database=mojoPortalTutorial" />

Thank you for your help!

1/28/2012 1:58:22 PM
Gravatar
Total Posts 4

Re: mojoPortal project DB login fail

I should add that I did create a database name, a user, and a password that corresponds to the information above and have given the username 'mojouser ' db_owner permissions

1/29/2012 6:12:02 AM
Gravatar
Total Posts 18439

Re: mojoPortal project DB login fail

Hi,

Are you updating the connection string in Web.config or user.config?

If user.config exists it will use the conneciton string from there instead of web.config, but when you edit user.config it will not automatically detect changes to that file so you need to touch web.config ie type a space and save it to make it reload settings after editing user.config.

Hope that helps,

Joe

1/29/2012 11:01:59 AM
Gravatar
Total Posts 4

Re: mojoPortal project DB login fail

Thank you for your response, Joe.

 

I did try that, but it didn't help. I ended up deleting and reinstalling SQL Express 2008 R2, and configured the SQLbrowser to allow remote connections. I am, however, receiving a new error:

 

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

I suspect that my problems with the code running might stem from my SQL installation. I guess I am asking what my settings should be, and if I am posting this questions on the right forum.

1/29/2012 11:12:30 AM
Gravatar
Total Posts 18439

Re: mojoPortal project DB login fail

Hi,

Your connection string is like this:

<add key="MSSQLConnectionString" value="server=localhost\SQLExpress;UID=mojouser;PWD=mojo123;database=mojoPortalTutorial" />

The instance name is in bold and needs to match what you used for the instance name when you installed SQLExpress, or if it was installed as a default instance you would remove "\SQLExpress" and just have localhost

You don't really need to enable remote connections if the web site is on the same machine as the database, in fact its better for security not to unless you really need to let other machines conect to the sql server on your dev machine.

Hope that helps,

Joe

1/31/2012 1:03:33 PM
Gravatar
Total Posts 4

Re: mojoPortal project DB login fail

Thank you very much Joe, that did help and now my computer can find the server. Unfortunately it is now giving me the error "login failed for user 'mojouser'". I apologize for my lack of experience; I am generally a programmer on a pre-set environment thus I have little Admin experience. I don't know if you know of a possible quick fix for this... I suspect that this is a problem with my database set-up rather the code.

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