 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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
|
|
|
|

April 17th, 2007, 12:10 AM
|
Registered User
|
|
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
unable to configure properly
XP Pro SP2, Framework 1.1, 2.0 IIS installed.
run installer included with book, and received this message for most if not all apps.
###
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
###
highlighted code in machine.config is below...
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
relatively new to how this should be configured, any help would be appreciated, I dont want to go take this book back...
Thx,
CHRIS
|

April 17th, 2007, 01:10 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
If you're threatening to return the book after your very first error, I think you're going to have a hard time completing the book. Run-time or any other errors are part of the learning experience. There's stuff you forget to change, SQL Servers that are down, IIS servers that misbehave, a few problems with the book that have been reported in the errata section and so on and so.
I am not saying that things won't work out of the box, but you'll have to be a little patient while you learn.... ;)
Second: what chapter is this for?
Third: did you configure IIS correctly to run against the .NET 2 Framework? There's a tab on the web site's properties that allows you to do this.
Fourth: did you install IIS before the .NET 2 framework?
Fifth: How are you browsing to the site? As http://localhost/AppName or from within VWD?
Finally, try to create a brand new site to test things out:
1. Create a new site
2. Drag a new CreateUserWizard on the screen
3. Run the site by pressing F5
4. Try to sign up for an account. Does that work?
Maybe you don't have SQL Server Express installed?
Imar
|

April 17th, 2007, 02:44 PM
|
Registered User
|
|
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I was under the impression that the installer took care of the project setup and implementation on my local machine, no worries...
To answer your questions...
I was trying project number 7 as recommended in the book as a more simple project to begin with.
I set the default website (and the virtual directory) to use the 2.0... framework using IIS admin tool.
I believe I installed VS.NET before IIS, although I uninstalled VS and reinstalled IIS then re installed VS as I had read this may be problematic.
I am accessing the site with the url: http://localhost/PhotoGallery/default.aspx
I attempted your suggestion and I received the same error. (in the machine.config)
###
Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Source Error:
Line 129: <roleManager>
Line 130: <providers>
Line 131: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 132: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider , System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 133: </providers>
###
I do have SQL server express installed with VS.NET
This seems to be across the board, for any site I try to set up.
Please advise if i need to make changes to the machine.config.
Thanks,
Christopher
Quote:
quote:Originally posted by Imar
Hi there,
If you're threatening to return the book after your very first error, I think you're going to have a hard time completing the book. Run-time or any other errors are part of the learning experience. There's stuff you forget to change, SQL Servers that are down, IIS servers that misbehave, a few problems with the book that have been reported in the errata section and so on and so.
I am not saying that things won't work out of the box, but you'll have to be a little patient while you learn.... ;)
Second: what chapter is this for?
Third: did you configure IIS correctly to run against the .NET 2 Framework? There's a tab on the web site's properties that allows you to do this.
Fourth: did you install IIS before the .NET 2 framework?
Fifth: How are you browsing to the site? As http://localhost/AppName or from within VWD?
Finally, try to create a brand new site to test things out:
1. Create a new site
2. Drag a new CreateUserWizard on the screen
3. Run the site by pressing F5
4. Try to sign up for an account. Does that work?
Maybe you don't have SQL Server Express installed?
Imar
|
|

April 17th, 2007, 02:57 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Chris,
Take a look here: %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG
You should see a file called machine.config.
On my machine, on line 126 you see a connectionString defined called LocalSqlServer (with Word wrap turned off)
Do you have that? Normally, when you install .NET 2, you get that file with the connectionString defined in it.
Somehow, this may be missing in your case.
Can you confirm it's there?
in what order did you install .NET / IIS / VWD and SQL Express?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|

April 17th, 2007, 05:12 PM
|
Registered User
|
|
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you for your reply.
At line 126 in this file, I have the following
###
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
###
Are the values in here correct?
I believe the order I installed items was...
IIS
VS.NET
<the application>
SQL Server express
note: I also have sql 2000 server running on this machine locally
Should I remove everything and reinstall in a recommended order?
Thanks again,
Christopher
|

April 18th, 2007, 01:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Sorry, it wasn't about line 126, but about the ConnectionString. You should have something like this:
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User
Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
Do you have that?
If not, either try adding it under the <system.web> in machine config (or in your website's web.config) node or try reinstalling .NET 2. Something is really wrong....
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|
 |