Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 17th, 2007, 12:10 AM
Registered User
 
Join Date: Apr 2007
Location: Kansas City, MO, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


  #2 (permalink)  
Old April 17th, 2007, 01:10 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
  #3 (permalink)  
Old April 17th, 2007, 02:44 PM
Registered User
 
Join Date: Apr 2007
Location: Kansas City, MO, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #4 (permalink)  
Old April 17th, 2007, 02:57 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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.
  #5 (permalink)  
Old April 17th, 2007, 05:12 PM
Registered User
 
Join Date: Apr 2007
Location: Kansas City, MO, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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



  #6 (permalink)  
Old April 18th, 2007, 01:32 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Unable to configure IIS website to use ASP.NET 2.0 japss ASP.NET 2.0 Professional 2 July 14th, 2008 09:14 AM
Unable to configure database mail pabnix SQL Server 2005 0 February 23rd, 2008 08:06 AM
Iis not works properly karib ASP.NET 1.0 and 1.1 Basics 5 March 22nd, 2006 09:39 AM
Properly supporting Unicode in C++ jdcohen C++ Programming 0 November 20th, 2003 06:26 AM
PreparedStatement not working properly wslyhbb Java Databases 3 September 9th, 2003 01:08 PM



All times are GMT -4. The time now is 08:57 PM.


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