Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
  #11 (permalink)  
Old May 15th, 2011, 05:42 PM
Registered User
 
Join Date: Apr 2011
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Default

the problem was the page title on my error404.aspx , this happend as i had deleted the original file (with title there), but after i had made new one forgotten to put a title again...silly me....sorry again

by the way how can i do away with the site in localhost:49642/site/.... to have files straight under localhost, such as localhost:49642/login.aspx for example?

thanks
  #12 (permalink)  
Old May 16th, 2011, 03:03 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Quote:
by the way how can i do away with the site in localhost:49642/site/
Check out Chapter 7, with the first 10 pages or so in particular.

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!
  #13 (permalink)  
Old September 10th, 2013, 09:27 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default I have the same problems

all the url are similar "http://localhost:43968/Sites/Default.aspx", which has a Sites.
I right click the Default.aspx, it shows that way.
but your way is "http://localhost:43968/Default.aspx"

I open your source eg: ch18, it also shows:
http://localhost:16883/Chapter%2018/Defaultt.aspx

I trace my code, it run to Error404.aspx.cs
Code:
public partial class Errors_Error404 : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Status = " 404 Not  Found";
        Response.StatusCode = 404;
    }
}
I set break at Response.Status="404 Not Found"
it run to here, but after step
it become to:


Server Error in '/Sites' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Sites/Defaultt.aspx

If I run your code ch18, it could go to Error404.aspx
Maybe I should compare the two folder, but it's not easy.
  #14 (permalink)  
Old September 10th, 2013, 09:42 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My system is windows 7, Visual studio 2010
  #15 (permalink)  
Old September 11th, 2013, 08:50 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

now I got about site

all the url are similar "http://localhost:43968/Sites/Default.aspx", which has a Sites.
I right click the Default.aspx, it shows that way.
but your way is "http://localhost:43968/Default.aspx"

I open your source eg: ch18, it also shows:
http://localhost:16883/Chapter%2018/Defaultt.aspx


in Page 243, or figure 7-2
I should set the Virtual Path to /

but the 404 does not occur. I copy your code in web.config
Code:
<customErrors mode="On" defaultRedirect="~/Errors/OtherErrors.aspx" redirectMode="ResponseRewrite">
      <error statusCode="404" redirect="~/Errors/Error404.aspx"/>
    </customErrors>
I feel strange that when I copy your code in Errors, it become fine.
Then I delete them and make again, it also work well.
  #16 (permalink)  
Old September 11th, 2013, 02:00 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default I got the reason, is it right?

I compare the right and the wrong and find that:
Wrong is:
Response.Status = " 404 Not Found";
Right is :
Response.Status = "404 Not Found";

the difference is that before 404 , wrong one has a space
That means you have to accurate input every letter.
Be careful!!




Similar Threads
Thread Thread Starter Forum Replies Last Post
CH18 - IIS Problems - Server Application Error Pegasus40218 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 April 2nd, 2010 03:46 PM
Iam having problem running ch18 sample code wanes98 Wrox Book Feedback 1 June 7th, 2007 07:19 AM
porting ch18 sample code to new kernels ninuzzo BOOK Beginning Linux Programming, 3rd Edition 1 February 12th, 2007 12:50 PM
problems with struts example on ch18 tkiehle JSP Basics 1 July 2nd, 2003 12:01 AM





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