Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > BOOK: ASP.NET 3.5 Website Programming Problem Design Solution
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Website Programming Problem Design Solution
This is the forum to discuss the Wrox book ASP.NET 3.5 Website Programming Problem Design Solution by Chris Love; ISBN: 978-0-470-18758-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 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 July 27th, 2010, 10:01 PM
Authorized User
 
Join Date: Apr 2010
Location: Seattle, WA
Posts: 50
Thanks: 3
Thanked 0 Times in 0 Posts
Default Anybody knos why I'm getting build error?

Error 1 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. C:\Inetpub\wwwroot\TheBeerHouse\TBH_Web\web.config 30


When I go to web.config line 30, it has,
.......
<system.web>
<authentication mode="Forms">
<forms cookieless="AutoDetect" loginUrl="~/AccessDenied.aspx" name="TBHFORMAUTH"/>
</authentication>
<pages theme="TemplateMonster" masterPageFile="~/Template.master" maintainScrollPositionOnPostBack="true">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
<!--
Possible modes are "transitional", "strict", and "legacy".
<xhtmlConformance mode="transitional" />
-->
.............
  #2 (permalink)  
Old July 28th, 2010, 06:25 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

You get this error when a web.config file in a subfolder not marked as an application in IIS overrides settings that can only be defined in the root of the site.

It can happen, for example, when you open C:\Inetpub\wwwroot\TheBeerHouse and then browse to http://localhost/TBH_Web instead of opening C:\Inetpub\wwwroot\TheBeerHouse\TBH_Web and browsing to http://localhost.

Hope this helps,

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!
  #3 (permalink)  
Old July 28th, 2010, 01:50 PM
Authorized User
 
Join Date: Apr 2010
Location: Seattle, WA
Posts: 50
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Not sure what you mean! Are you suggesting to change location of the webapp? Or, are you suggesting to change anything in the web.config file? What change would that be?
  #4 (permalink)  
Old July 28th, 2010, 03:28 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

No, no need to change the web.config. This is about the site under IIS, or in Visual Studio, depending on where you get the error.

I don't have the book, so I don't know if this is a Web Site Project or a Web Application Project, and whether or not your site is running under IIS or under the built-in web server. That's why I could only provide some general information.

So, depending on your setup, check the project / site you opened in Visual Studio, or check the root path for the site in IIS. In both cases, you need to use C:\Inetpub\wwwroot\TheBeerHouse\TBH_Web\ and not its parent.

If this still doesn't make sense, you need to povide lots more details about your setup and actual problem.

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!
  #5 (permalink)  
Old July 28th, 2010, 06:30 PM
Authorized User
 
Join Date: Apr 2010
Location: Seattle, WA
Posts: 50
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Why can't the project types be interchangeable? I'm not sure what project types I created! I just created a asp.net web application under VS 2008 and added all the Beer house files in there. It has been working all this time until yesterday when I tried to bring up this app again. Within that time, I did work with VS 2010 simultaneously. Not sure if that changes anything!
  #6 (permalink)  
Old July 29th, 2010, 04:15 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

Quote:
Why can't the project types be interchangeable?
Different architecture. Web Sites are basically just folders on disk, while Web Applications have a central project file. Each type has its own pros and cons.

Quote:
If this still doesn't make sense, you need to povide lots more details about your setup and actual problem.
Again: I don't have the book, so I don't know if this is supposed to be a web app or not. You also haven't answered my questions about IIS versus Visual Studio, setup, folders, the way you browse to the site, where you get the error and so on, so I can't help you here without that info

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!
  #7 (permalink)  
Old July 29th, 2010, 04:26 PM
Authorized User
 
Join Date: Apr 2010
Location: Seattle, WA
Posts: 50
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Different architecture. Web Sites are basically just folders on disk, while Web Applications have a central project file. Each type has its own pros and cons.

Again: I don't have the book, so I don't know if this is supposed to be a web app or not. You also haven't answered my questions about IIS versus Visual Studio, setup, folders, the way you browse to the site, where you get the error and so on, so I can't help you here without that info

Cheers,

Imar
Sorry for not providing the setup information. Now, there's a tweak I found, so, I can atleast bring up the app by browsing a file. For instance, contacts.aspx I choose 'open in the browser' it opens up and then I can browse to Homepage, or any other pages I like to...

Here it is:

VS 2008. Setup in the way so that the following comes up:

C:\Inetpub\wwwroot\TBH_Web\

Not the way as expected

C:\Inetpub\wwwroot\TheBeerHouse\TBH_Web\
  #8 (permalink)  
Old July 29th, 2010, 05:40 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

Quote:
Not the way as expected
Based on what?

I am sorry, but I can't help you if you don't provide relevant information. I am not sure how you think I can help you if you don't answer the questions I am asking. I don't have the book, I don't know about your system, IIS, VS and what more.

So, if you want help, please reread all my posts in this thread and try to answer the questions I am asking. Be specific. Explain what you open in VS, how you configured IIS, what you see in the browser's address bar and so on.

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!
  #9 (permalink)  
Old July 29th, 2010, 05:54 PM
Authorized User
 
Join Date: Apr 2010
Location: Seattle, WA
Posts: 50
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Never mind! I think I solved the problem inadvertantly. Like I said, instead of opening through VS 2008 a sa project, just have to open eqach file and run.
  #10 (permalink)  
Old July 30th, 2010, 02:21 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

The it looks like most things are configured correctly, except for the Start Page in VS maybe? Right click the site and choose Property Pages. Then look under Start Options. Maybe it's referring to a wrong path? For a Web Application, you find similar settings in the Web tab of the Properties dialog.

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!
 


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
Build Error venessaz BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 46 March 30th, 2016 12:25 PM
VB2005 Project Build Error ashg657 Visual Basic 2005 Basics 1 August 6th, 2006 06:57 PM
C# - Chapter 3 Build Error TJ BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 29th, 2006 03:43 PM
Build Error - Plz Help - Thanks ank2go ASP.NET 1.0 and 1.1 Basics 1 February 23rd, 2004 10:09 PM
error on build stewbaby C++ Programming 1 October 30th, 2003 06:07 PM



All times are GMT -4. The time now is 10:52 PM.


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