2

I'm trying to deploy my .net website to a shared hosting server. I'm getting the following error when entity framework tries to connect to the database:

Server Error in '/' Application.

Login failed for user 'PHX3\Iusr_9086819'. 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.Data.SqlClient.SqlException: Login failed for user 'PHX3\Iusr_9086819'.

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:

[SqlException (0x80131904): Login failed for user 'PHX3\Iusr_9086819'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5061898
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234

Here is my connection string, with sensitive data removed:

<add name="CoreEntities" 
 connectionString="
 metadata=res://*/CoreModel.csdl|res://*/CoreModel.ssdl|res://*/CoreModel.msl;
 provider=System.Data.SqlClient;
 provider connection string='
 Data Source=*****.db.*****.hostedresource.com; 
 Initial Catalog=kshoultz; 
 integrated security=True;
 multipleactiveresultsets=True;
 App=EntityFramework; 
 User ID=*****;
 Password=*****; 
 Database=*****;
 '" 
 providerName="System.Data.EntityClient" />
Adam
16.2k7 gold badges68 silver badges112 bronze badges
asked Mar 14, 2012 at 2:13

1 Answer 1

4

I think integrated security should be false - that means not to use a user id and password. Initial catalog is the name of the database - did they tell you the database was named kshoultz? (Could be, I don't know any different, but if you created a database and chose a name, that's the name you want to use). Has the password got any characters that aren't letters/numbers? You have to encode them, for example is your password is Love&Peace you have to say Love&amp;Peace

Have you asked GoDaddy support?

answered Mar 14, 2012 at 3:06
3
  • Thank you. Setting integrated security to false solved the problem. Commented Mar 14, 2012 at 5:25
  • This worked. Can you explain why Integrated security had to be turned off? Commented Aug 24, 2012 at 0:08
  • 2
    @Ratan Integrated security means that the person who is running the process is recognized by sql server as a windows user. In a shared environment, you don't want just any instance of the web server to access your database, or any other user on the machine could attach to your database - the "User" is some system account that is associated with the Web Server itself. So instead, it has to pass in a password. Shorter answer: "Integrated security" means you don't need a password. Commented Aug 24, 2012 at 19:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.