 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

August 4th, 2011, 03:46 PM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Chap 12 - Login failed for user....
In Chap 12, I'm having consistent trouble either using or creating a database. I keep getting an error msg, "Login failed for user 'Gateway_64\Jack.
I should be logging onto my server at 'Gateway_64\SQLEXPRESS'
How can I correct this situation permanently so that whenever I create a database the system knows that I should be logging into Gateway_64\SQLEXPRESS without any intervention from me.
Thanks in advance,
JKoyle
|
|

August 4th, 2011, 05:49 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you post your connection string? Is your account an administrator on your machine? And do you run this using the local development server or are you using IIS?
Imar
|
|

August 4th, 2011, 07:01 PM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Connection String = Data Source=GATEWAY_64\SQLEXPRESS;AttachDbFilename=C:\B egASPNET\Site\App_Data\PlanetWrox.mdf;Integrated Security=True
Account is Administrator
I'm running this on my local machine.
I created a workaround by Modifying my connection so everything works. However, I would like to avoid having to modify my connection. Isn't there a default setting somewhere that I can set?
JKoyle
|
|

August 5th, 2011, 02:44 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
However, I would like to avoid having to modify my connection. Isn't there a default setting somewhere that I can set?
|
Not sure what you mean by that. What did you have to change? And what did you change it from?
Imar
|
|

August 5th, 2011, 09:51 AM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Chap 12 - Can' t logon to server Page 407, Item 4.
I received this error today...Login failed for user 'Gateway_64\Jack'.
here is the INCORRECT connection string
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\BegASPNET\ Site\App_Data\PlanetWrox.mdf;Integrated Security=True;User Instance=True
I SELECTED MODIFY CONNECTION WHEN I RIGHT MOUSE PlanetWrox.mdf in the Server Explorer
Data Source was incorrect. It had Microsoft SQL Server Database File (SqlClient).
I changed it to Microsoft SQL Server.
The Data Provider had .NET Framework Data Provider for SQL Server. I DID NOT CHANGE THAT.
At the bottom I CHECKED 'Always use this selection. I clicked OK
From the drop down arrow, I selected GATEWAY_64\SQLEXPRESS. They were all in caps.
The next option was to connect to a database. There were 2 choices (radio buttons).
The first one, Select or enter a database name did not work, even with the correct database name, C:\BegASPNET\Site\App_Data\PlanetWrox.mdf
I then chose the 2nd radio button, Attach a database file, C:\BegASPNET\Site\App_Data\PlanetWrox.mdf and then clicked on Test Connection. The results were positive, a dialog box told me Test connection succeeded
I then clicked OK.
My new correct connection string = Data Source=GATEWAY_64\SQLEXPRESS;AttachDbFilename=C:\B egASPNET\Site\App_Data\PlanetWrox.mdf;Integrated Security=True
EVERYTHING WORKS, HOWEVER, HERE IS MY PROBLEM:
WHY DO I HAVE TO DO THIS EACH AND EVERYTIME I OPEN VWD and select my Project name of Site. Why to I have to Modify the Connection AGAIN?
PLEASE HELP. THIS SHOULD NOT BE NECESSARY AND IT IS VERY FRUSTRATINNG.
Thanks,
JKoyle
|
|

August 5th, 2011, 10:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
No need to shout; we hear you loud and clear (writing in ALL CAPS is considered shouting in public forums and comes across as a bit impolite).
That said, the change I see in the connection string is the machine name versus the dot (.), and the use rinstance, right?
If so, you may want to look at Appendix B and follow the instructions around page 760 and enable TCP ID and Named Pipes.
You may also want to verify the settings under Tool | Options | Database Tools | Data Connections and see if SqlExpress is the named instance.
If this doesn't help, I don't know what's going on.
Cheers,
Imar
|
|
 |
|