Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #51 (permalink)  
Old August 22nd, 2012, 10:33 AM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,033
Thanks: 80
Thanked 1,582 Times in 1,559 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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
jdlferreira (August 22nd, 2012)
  #52 (permalink)  
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.
Reply With Quote
  #53 (permalink)  
Old August 22nd, 2012, 10:55 AM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,033
Thanks: 80
Thanked 1,582 Times in 1,559 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!
Reply With Quote
  #54 (permalink)  
Old November 9th, 2012, 01: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 02:42 PM. Reason: Found it, needed to put single quotes around the connection string
Reply With Quote
  #55 (permalink)  
Old November 10th, 2012, 12: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!
Reply With Quote
  #56 (permalink)  
Old November 10th, 2012, 12: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.
Reply With Quote
  #57 (permalink)  
Old November 10th, 2012, 12: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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03: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



All times are GMT -4. The time now is 10:09 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.