Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This got kicked off of Stackoverflow as off topic. I was told to post here so hoping you guys can help me out.

I'm running on MSSQL 2008 Express, EF5 and MVC4

My web.config file looks a bit like this:

<configuration>
    <connectionStrings>
        <add name="DefaultConnection" connectionString="Data Source=\SQLEXPRESS; Initial Catalog=derpmart; User Id=appuser; Password=bacon;"/>
    </connectionStrings> </configuration>

I've made sure my sql server login that I'm using here has CREATE DATABASE permission on the master database, but I'm still getting the following error:

CREATE DATABASE permission denied in 'master'.

The site is currently running off the asp.net development web server that gets created when you debug a wep app so I don't know if that' running under a different username and if that could be causing the problem.

I've tried this using multiple logins (the above, sa, windows authentication on an administrator account) and still can't get anything to happen.

I'm out of ideas here so if anyone has anything to add, I'd love to hear your thoughts and suggestions. Please have thoughts and suggestions!

EDIT
Now I'm getting this when I try to login with the user specified in the connection string:

TITLE: Connect to Server

Cannot connect to LOGAN-PC\SQLEXPRESS.


ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during > the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other > end of the pipe.) (Microsoft SQL Server, Error: 233)

For help, click: http://go.microsoft.com/fwlink?> ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476


BUTTONS:

OK

EDIT

Fixed that, as Named Pipes was not enabled in SQL Configuration Manager. Still getting the CREATE DATBASE error though.

share|improve this question
    
Have you connected to the server using SSMS and logged in using the same credentials? I would also check that the master database exists and then try running the Create database command from a query and see if it a database error or a ef connection error. –  Alain King Feb 25 '13 at 12:29
    
Yes, I can create the database in SSMS with the same login. It just fails when I try it from the website. Integrated Security using a Windows Administrator account also fails –  Ortund Feb 26 '13 at 10:48
    
Do you have profiler? If you do it, run it and see what command EF is sending to the DB, you can then try running the exact same command with all the parameters in SSMS and see if that gives you any further information. –  Alain King Feb 26 '13 at 10:56
    
Have you double-checked that Entity Framework is using the correct connection string? myContext.Database.Connection.ConnectionString –  bricelam May 16 '13 at 16:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.