Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > Wrox Book Feedback
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Wrox Book Feedback A forum to submit feedback on Wrox books if other forums on P2P have been unable to address your book-specific needs. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Wrox Book Feedback 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 Search this Thread Display Modes
  #11 (permalink)  
Old November 20th, 2007, 02:33 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I think you want to map it as a root site, not a VD.

So, map: c:\websites\begin\Chapter3 to http://localhost in IIS and try again...

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.
Reply With Quote
  #12 (permalink)  
Old November 26th, 2007, 02:07 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got the same message as above (see listing below) but I'm using VS 2005 and the VS Development server. Is there a way fix this problem in the development web server?

TIA,

amorphous

-------------------------------------
Server Error in '/Chapter03' Application.
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: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 39: Set forms authentication and define the login page
Line 40: -->
Line 41: <authentication mode="Forms">
Line 42: <forms loginUrl="Default.aspx"></forms>
Line 43: </authentication>
----------------------------------


Reply With Quote
  #13 (permalink)  
Old November 26th, 2007, 03:07 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Are there web.config file in any of the parent folders you are opening?

Or maybe you opened BegECom in Visual Studio and have Chapter02 as a sub folder in the Solution Explorer? If that's the case, try opening the Chapter02 folder as a site directly.

HtH,

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.
Reply With Quote
  #14 (permalink)  
Old November 27th, 2007, 02:22 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar wrote:
 Hi there,

Are there web.config file in any of the parent folders you are opening?

Or maybe you opened BegECom in Visual Studio and have Chapter02 as a sub folder in the Solution Explorer? If that's the case, try opening the Chapter02 folder as a site directly.
-------------------------------------

"web.config" question: I have a folder "C:\MyDir\ASP_NET\Chapter03\WroxUnited". There are web.config files in both the "Chapter03" and the "WroxUnited" folder (see below). The web site I open is "C:\MyDir\ASP_NET\Chapter03\WroxUnited". Should there only be a web.config file in the "Chapter03" folder and not in the contained "WroxUnited" folder?

The web site I opened was "C:\MyDir\ASP_NET\Chapter03". The problem does not seem to occur when I open the folder

Contents of "C:\MyDir\ASP_NET\Chapter03\web.config":
-------------------------
<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <compilation debug="true"/>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
        <authentication mode="Windows"/>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm"/>
            <error statusCode="404" redirect="FileNotFound.htm"/>
        </customErrors>
        -->
    </system.web>
</configuration>
-------------------------

Contents of "C:\MyDir\ASP_NET\Chapter03\WroxUnited\web.config" :
-------------------------
<?xml version="1.0"?>
<!-- Note: As an alternative to hand editing this file you can use the web admin tool to
     configure settings for your application. Use the Website->Asp.Net Configuration option
     in Visual Studio.
     A full list of settings and comments can be found in machine.config.comments usually
     located in \Windows\Microsft.Net\Frameworks\v2.x\Config -->
<configuration>
  <!--
    Mode defines certain feature availability:
      Full: No restrictions
      Real: Runs as if a real site, without the view code, download and user/role view links
  -->
  <appSettings>
    <add key="mode" value="Full" />
  </appSettings>

    <!--
        define the connection string to the database
    -->
  <connectionStrings>
     <add name="WroxUnited"
         connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|WroxUnited.mdf;Integrated Security=True;User Instance=True"
         providerName="System.Data.SqlClient" />
  </connectionStrings>

  <system.web>

    <httpModules>
      <add name="Page" type="Wrox.Web.GlobalEvents.ThemeModule" />
    </httpModules>

    <!--
            Set compilation debug="true" to insert debugging symbols into the compiled page.
            Because this affects performance, set this value to true only during development.
        -->
    <compilation debug="true">
    </compilation>
    <!--
            Set forms authentication and define the login page
        -->
    <authentication mode="Forms">
      <forms loginUrl="Default.aspx"></forms>
    </authentication>
    <!--
            Enable the role manager
            This controls access to pages and the visibility of certain menu items
        -->
    <roleManager enabled="true"/>
    <anonymousIdentification enabled="true"/>
    <!--
            The <customErrors> section enables configuration of what to do if/when an unhandled
            error occurs during the execution of a request. Specifically, it enables developers
            to configure html error pages to be displayed in place of a error stack trace.
        -->

        <customErrors mode="RemoteOnly">
      <error statusCode="404" redirect="missingPage.aspx"/>
        </customErrors>

    <!--
            Redefine the Site Map Provider, to add the security trimming attribute,
            which is off by default
        -->
    <siteMap defaultProvider="AspXmlSiteMapProvider" enabled="true">
      <providers>
        <clear/>
        <add name="AspXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
          siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
      </providers>
    </siteMap>

    <!--
            Define the user profile properties
        -->
    <profile enabled="true">
      <properties>
        <add name="MemberName"/>
        <add name="Name"/>
        <add name="Address"/>
        <add name="City"/>
        <add name="County"/>
        <add name="PostCode"/>
        <add name="Country"/>
        <add name="Mailings" type="System.Boolean"/>
        <add name="Email"/>
        <add name="Theme"/>
        <add name="Cart" serializeAs="Binary" type="Wrox.Commerce.ShoppingCart" allowAnonymous="true"/>
      </properties>
    </profile>

  </system.web>

  <system.net>
    <mailSettings>
      <!-- these settings define the mail server settings
        from: the user name from which the email is sent - this is the application that is sending the message
        host: the name of your mail server
        userName: the name the application will use to log into the mail server
        password: the password for the above user name
      -->
      <smtp from="admin@your-domain.com">
        <network host="your-mail-server-name"
                 userName="your-user-name"
                 password="your-password" />
      </smtp>
    </mailSettings>
  </system.net>

</configuration>
-------------------------

Reply With Quote
  #15 (permalink)  
Old November 27th, 2007, 04:45 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I am not sure why there would be config files in both the Chapter03 and WroxUnited folders. The one in Chapter03 doesn't seem to do much.

My suggestion, rename the one in Chapter03 to .old and then open the WroxUnited folder in Visual Web Developer. That folder is then the root of your site.

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
Reply With Quote
  #16 (permalink)  
Old December 19th, 2007, 01:39 PM
Registered User
 
Join Date: Dec 2007
Location: Afton, OK, .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am so greatful for Imar's last comment. Been fussing for days with this error. Have XP Home Edition and thought it might be related. Changed that file web.config in Begin/Chapter03 and my troubles went away.
1000 Roses to you!!!!
Reply With Quote
  #17 (permalink)  
Old December 19th, 2007, 02:10 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:1000 Roses to you!!!!
Where can I collect them?? ;)

Glad it's working now....

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.
Reply With Quote
Reply


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
Beginner to ASP .net 2.0 help chuckd ASP.NET 2.0 Basics 0 September 1st, 2006 11:31 PM
asp.net beginner LAKESIDE Classic ASP Databases 0 January 2nd, 2006 11:28 AM
A beginner in ASP.Net need help hoailing22 ASP.NET 1.0 and 1.1 Basics 4 May 11th, 2005 12:56 AM
ASP.NET beginner Anup Gavate ASP.NET 1.0 and 1.1 Basics 1 April 21st, 2005 12:49 PM
why? i'am a beginner .thank you? dqfverygood Wrox Book Feedback 1 November 11th, 2004 03:28 AM



All times are GMT -4. The time now is 06:27 AM.


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