Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
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 July 1st, 2012, 11:30 PM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Question How do I write data to my database using the CreateUserWizard?

I am a total beginner in ASP.Net.
I am developing a web site that act as electronic sell.
I use entity frame work to store data in my database that contain 3 table:
One for product ,one for customer and the last for the order .
I create sign up page that use web user control because I need extra information about the user like his address, city ,post code, …etc that help me to make the order .
In the book it use create user wizard (CRW)in sign up how I store user data that comes from the form in customer table and in ASPNETDB.MDF that used for log in ..
I confused if I used CRW how I store extra data in mine customer table , or If I cont. with my way how I store user data to ASPNETDB.MDF that help in log in , Please help me I am totally beginner in asp.net ..
 
Old July 2nd, 2012, 09:14 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Check out Appendix B; it describes this process in detail using aspnet_regsql....

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:
jeje (July 17th, 2012)
 
Old July 7th, 2012, 02:56 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Thanks for help I well do what you say,and I well Inform you by the result.
 
Old July 17th, 2012, 04:17 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Unhappy help me!!!!!!!!!!!!!!

Dear ,
Sorry for delay because I have special situation ,
I read part of the appendix B and I follow the Instruction on the Planet Wrox project step by step but I get an exception error when I log in saying :
"
Server Error in '/Site' Application.

Login failed for user 'PlanetWroxUser'.

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 'PlanetWroxUser'.

"

even before I brows the default page when I edit the web.confing file as page 767 in the book I see a message in the output screen saying :
“
The 'provider connection
string' keyword is not supported.
” .
Note :for more information I stop the Planet Wrox project development at chapter 18 and I start mine project I would to complete mine then I will read chapter 19 so I stop reading at chapter 18 if there is relation to the error please inform me.
 
Old July 17th, 2012, 05:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Hard to say without more relevant information. Can you supply:

1. The account you configured in SQL Server (Windows Authentication or SQL Authentication)

2. The setup of your IIS Connection Pool

3. The code for your connection strings

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:
jeje (July 17th, 2012)
 
Old July 17th, 2012, 05:31 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Unhappy please help me Dr.Imar

please help I want to complete the reading of chapter 19
then read appendix B to be in the right way and safe side ,
but when I return everything back I got error that the file ASPNETDB.mdf is mismatch and other words…………………
when I try to open the aspnetdb_log.ldf there is error that saying the file is open I try to disconnect the explorer object in management studio and try again I try to open the aspnetdb_log.ldf file in other program I fail help me to change the open with program that open aspnetdb_log.ldf I lose it and I forgot what was I want everuthing back to first please help Dr.Imar ,I am novice.
 
Old July 17th, 2012, 05:35 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Hi there,

Hard to say without more relevant information. Can you supply:

1. The account you configured in SQL Server (Windows Authentication or SQL Authentication)

2. The setup of your IIS Connection Pool

3. The code for your connection strings

Cheers

Imar
the account (Windows Authentication )
the setup of IIS I dont undrstand it.
the conn. same as the book :
<connectionStrings>
<clear />
<add name="PlanetWroxConnectionString1" connectionString="Data Source=.\SqlExpress;
Initial Catalog=PlanetWrox;
User Id=PlanetWroxUser;
Password=Pa$$w0rD"
providerName="System.Data.SqlClient" />

<add name="PlanetWroxEntities" connectionString="
metadata=res://*/App_Code.PlanetWrox.csdl|res://*/App_Code.PlanetWrox.ssdl|res
://*/App_Code.PlanetWrox.msl;provider=System.Data.SqlCl ient;provider connection
string=&quot; Data Source=.\SqlExpress;Initial Catalog=PlanetWrox;
User Id=PlanetWroxUser;Password=Pa$$w0rD;MultipleActive ResultSets=True&quot;"
providerName="System.Data.EntityClient" />
<add name="LocalSqlServer" connectionString="Data Source=.\SqlExpress;
Initial Catalog=aspnetdb;User Id=PlanetWroxUser;Password=Pa$$w0rD"
providerName="System.Data.SqlClient" />
</connectionStrings>
 
Old July 17th, 2012, 05:46 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jeje View Post
please help I want to complete the reading of chapter 19
then read appendix B to be in the right way and safe side ,
but when I return everything back I got error that the file ASPNETDB.mdf is mismatch and other words…………………
when I try to open the aspnetdb_log.ldf there is error that saying the file is open I try to disconnect the explorer object in management studio and try again I try to open the aspnetdb_log.ldf file in other program I fail help me to change the open with program that open aspnetdb_log.ldf I lose it and I forgot what was I want everuthing back to first please help Dr.Imar ,I am novice.
what program I chosse from open with dialog or how I return it back as first time help help help please.
 
Old July 17th, 2012, 05:54 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Please try to be more helpful in describing what help you need. For example, this:

Quote:
what program I chosse from open with dialog or how I return it back as first time help help help please.
makes absolutely not sense to me.

Also:

Quote:
the account (Windows Authentication )
This a) doesn't help much as you're not specifying the actual account and b) the connection string you posted uses SQL authentication instead. Have another look at Appendix B to see the differences.

Quote:
the setup of IIS I dont undrstand it.
I am referring to things like the version of IIS / Windows, the name of the app pool, the identity it runs under, the .NET version it uses, etc. All the stuff described in Chapter 19.

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:
jeje (July 17th, 2012)
 
Old July 17th, 2012, 06:12 AM
Authorized User
 
Join Date: Jul 2012
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Default more informatiom

I told you when I try open the aspnetdb_log.ldf file to see if it open or not I right clik it and I try to open With .. from the menue that appear and I choose ranodmaly Microsoft Visaul studio selector and it dosnt open I try to open it with word and it doesnt open it tell me that the file is open in another program I need help in how to return it back to open with the defult program because the icon of it is change to word .


the other Issue is I try to do the words in the book first when the Management studio is open I choose Windows Authi. but when I reach to step Attaching Databases to SQL Server
Scenario 1 — Using SQL Server Authentication
Ido this step:
If not already selected, choose the SQL Server and Windows Authentication Mode item at the top of the screen. Before you click OK, click the Help item at the top of the screen and read a bit more about SQL and Windows Authentication, and determine if you really need SQL Server Authentication. Windows Authentication is more secure than SQL Server authentication, so you’re advised to use that option whenever possible.

I assume the first choice affect by that so I dont Know.

the last thing I dont understand but the program the dwonloaded with the wvd is IIS7.0 ,I didnt reach to chapter 19 so I am not understand that point yet.
if there is any thing you would me to write inform me thanks for care .

Last edited by jeje; July 17th, 2012 at 06:15 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I write data to my database using the CreateUserWizard? MtheK ASP.NET 2.0 Basics 12 March 8th, 2011 08:42 PM
Write to a database MMJiggy62 Beginning VB 6 3 August 24th, 2006 12:11 AM
Write data from access database to text files hayley Classic ASP Basics 1 February 1st, 2005 08:54 AM
Write to DataBase HELP!!! reidcor Javascript 3 January 19th, 2005 02:58 PM





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