Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
| Search | Today's Posts | Mark Forums Read
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
 
Old August 22nd, 2012, 10:33 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
jdlferreira (August 22nd, 2012)
 
Old August 22nd, 2012, 10:50 AM
Authorized User
Points: 113, Level: 2
Points: 113, Level: 2 Points: 113, Level: 2 Points: 113, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Cheers Imar, fully working now. I'm sorry to bother you with all these stupid questions... you're an ace dude.
 
Old August 22nd, 2012, 10:55 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No problem. That's why you bought a Beginner's book, didn't you? ;-)

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 9th, 2012, 02:58 PM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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
 
Old November 10th, 2012, 01:01 AM
Authorized User
Points: 257, Level: 5
Points: 257, Level: 5 Points: 257, Level: 5 Points: 257, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Location: Healing, UK
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

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 =&quot;Server=ATLAS-SQL-07; Database=carhirechaniacom_968718_db2; User Id=ucar_968718_0002; Password=MariaLena45; MultipleActiveResultSets=True;&quot;" 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!
 
Old November 10th, 2012, 01:12 AM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
Post 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.
 
Old November 10th, 2012, 01:19 AM
Authorized User
Points: 257, Level: 5
Points: 257, Level: 5 Points: 257, Level: 5 Points: 257, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Location: Healing, UK
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing Connection String in web.config TeaDrinkingGeek BOOK: Beginning ASP.NET 4 : in C# and VB 1 March 14th, 2011 10:42 AM
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
setting connection string in the web.config ACE2084 ADO.NET 2 January 6th, 2005 04:33 PM
Database Connection with Web.Config RPG SEARCH Classic ASP Databases 7 July 26th, 2004 06:10 PM
Variable Path in web.Config Connection String? ElPato General .NET 4 June 21st, 2004 05:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.