Wrox Programmer Forums
|
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
 
Old October 21st, 2006, 12:42 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginner's trouble - location of Default.aspx

I'm beginner and studying the book.
I found that I need to type, e.g. ChatServer project,

http://localhost/ChatServer/ContentFiles

before I can access the web page.

However, as the book said, I should be able to see the result just after I type:
http://localhost/ChatServer

But I got the error message "¥¼±ÂÅv±zÀ˵ø¦¹ºô­¶" .... (my IE is Chinese version)
In English, the message sounds like "You have no right to access this page".

But I have give all permission to ASPNET user.

Now, I always must include "ContentFiles" to the URL before people can see my web.

Hope someone can help.

My configuration:
WinXP SP2
.NET Framework 2.0
Visual Web Developer 2005 Express Edition + SQL 2005 Express
IIS 5.1

 
Old October 21st, 2006, 03:10 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,

Are you sure you configured IIS correctly? The error message you get is not an account permission issue, but is due to the fact that IIS doesn't allow you to browse folders. This usually means one of two things:

1. IIS is not configured for a "Default document" called Default.aspx

2. You don't have a file called Default.aspx in the root (e.g. /FileShare) of the application.

To fix it, try this:

1. Add a new page called Default.aspx in the /FileShare folder

2. In the code behind, add this code:


Protected Sub Page_Load(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles Me.Load
  Response.Redirect("ContentFiles")
End Sub

When users hit the /FileShare folder, they're taken to /FileShare/ContentFiles automatically.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
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.
 
Old October 21st, 2006, 04:21 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your reply.

There is really no the default.aspx in the root (e.g. /FileShare). That's what I found frustrating after executing "setup" to install the example files. The "Default.aspx" of most projects are located in the folder "ContentFiles" by default. I wonder why it is not located in the root by default. That's the point confusing me.

Anyway, the book give me hints and how-to about the aspects of ASP.NET 2.0. I've studied ASP.NET 2.0 for two months myself. The book give me practical experience. Thank you.


Quote:
quote:Originally posted by Imar
 Hi there,

Are you sure you configured IIS correctly? The error message you get is not an account permission issue, but is due to the fact that IIS doesn't allow you to browse folders. This usually means one of two things:

1. IIS is not configured for a "Default document" called Default.aspx

2. You don't have a file called Default.aspx in the root (e.g. /FileShare) of the application.

To fix it, try this:

1. Add a new page called Default.aspx in the /FileShare folder

2. In the code behind, add this code:


Protected Sub Page_Load(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles Me.Load
  Response.Redirect("ContentFiles")
End Sub

When users hit the /FileShare folder, they're taken to /FileShare/ContentFiles automatically.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
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.
 
Old October 22nd, 2006, 06:38 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,

It's just a matter of preference. If you dump all file in the root, your site becomes messy pretty soon. By putting the main front end in a folder (ContentFiles), the management files in the Management folder and so on, the site becomes easier to manage.

It's also easier to plug an application like FileShare into another web site. Just dump in the ContentFiles folder and a few other files and folders and you're done.

If you want, you can move all the files to the root. If you do so, you need to adjust a number of paths / links to the files.

Alternatively, create a Default.aspx in the root like I suggested earlier.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing 18-11 <location path='AdminPage.aspx'> terry hutt BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 June 20th, 2006 05:35 PM
default.aspx Louisa ASP.NET 1.0 and 1.1 Basics 4 October 14th, 2005 11:55 AM
Location of Access default command button icons ActuaryTm Access 2 September 16th, 2005 12:03 PM
Change TextBox control location on aspx page minhpx General .NET 2 March 4th, 2005 08:29 AM
img src an aspx location?? texasraven ASP.NET 1.0 and 1.1 Professional 10 May 10th, 2004 04:05 PM





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