 |
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 22nd, 2012, 10:33 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Is it required to configure the profile and roleManager settings?
|
If you use them, then yes.
Take a look at this:
Code:
<roleManager enabled="true" />
You haven't changed the connection string for the role provider. Take a look at page 774 for the proper configuration code.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

August 22nd, 2012, 10:50 AM
|
|
Authorized User
|
|
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Cheers Imar, fully working now. I'm sorry to bother you with all these stupid questions... you're an ace dude.
|
|

August 22nd, 2012, 10:55 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No problem. That's why you bought a Beginner's book, didn't you? ;-)
Imar
|
|

November 9th, 2012, 02:58 PM
|
|
Authorized User
|
|
Join Date: Nov 2012
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Connection string for Entity
Hi
I am having trouble with the connection string for Entities (see strings below)
Code:
<connectionStrings>
<add name="ConnectionString" connectionString="Server=ATLAS-SQL-07; Database=carhirechaniacom_968718_db2; User Id=ucar_968718_0002; Password=MariaLena45;" providerName="System.Data.SqlClient"/>
<add name="carsEntities" connectionString="metadata=res://*/App_Code.CarHire.csdl|res://*/App_Code.CarHire.ssdl|res://*/App_Code.CarHire.msl;provider=System.Data.SqlClient; provider connection string =Server=ATLAS-SQL-07; Database=carhirechaniacom_968718_db2; User Id=ucar_968718_0002; Password=MariaLena45; MultipleActiveResultSets=True" providerName="System.Data.EntityClient" />
</connectionStrings>
Visual studio says that the 'database' keyword is not supported in the Entity Data Model and that part of the website does not function. What am I doing wrong?
Thank you
Last edited by tommein; November 9th, 2012 at 03:42 PM..
Reason: Found it, needed to put single quotes around the connection string
|
|

November 10th, 2012, 01:01 AM
|
|
Authorized User
|
|
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Hi,
I can recognise a 123-Reg config string any day of the week. You have missed the quote characters in your connection string. Try this:-
Code:
<add name="carsEntities" connectionString="metadata=res://*/App_Code.CarHire.csdl|res://*/App_Code.CarHire.ssdl|res://*/App_Code.CarHire.msl;provider=System.Data.SqlClient; provider connection string ="Server=ATLAS-SQL-07; Database=carhirechaniacom_968718_db2; User Id=ucar_968718_0002; Password=MariaLena45; MultipleActiveResultSets=True;"" providerName="System.Data.EntityClient" />
Hope that helps.
Cheers,
Ian
N.B. For your own data security, do not post your passwords to a public forum. You are just asking for trouble!
|
|

November 10th, 2012, 01:12 AM
|
|
Authorized User
|
|
Join Date: Nov 2012
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Entity Strings
Thanks Ian
I was trying it with double quotes, but Visual Studio did not like it, then I tried it with single quotes for the string and it worked. Thank you for taking the time to reply.
|
|

November 10th, 2012, 01:19 AM
|
|
Authorized User
|
|
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
No Problem,
I just noticed that you were not the originator of the thread and I need to ask you a question. I will therefore start a new thread in the ASP General Discussion forum. Can you please read and respond if you can.
Cheers,
Ian
|
|
 |
|