Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. 404 Page not found

404 Page not found

Scheduled Pinned Locked Moved ASP.NET
comwindows-admintestingbeta-testingtools
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sun Rays
    wrote on last edited by
    #1

    Hi, I have posted site on IIS. And handled Application Error in Global.asax . If writting http://localhost/testing/ then it will open a default page which is set as Default.aspx But if writting http://localhost/testing/12112 then it is giving error like 404 Page not found.. So how to handle this errors.. as its not Begin Request so cant figure it out . Any settings in IIS ?

    Thanks, Sun Rays To get something you must have to try once. My Articles

    C E 2 Replies Last reply
    0
    • S Sun Rays

      Hi, I have posted site on IIS. And handled Application Error in Global.asax . If writting http://localhost/testing/ then it will open a default page which is set as Default.aspx But if writting http://localhost/testing/12112 then it is giving error like 404 Page not found.. So how to handle this errors.. as its not Begin Request so cant figure it out . Any settings in IIS ?

      Thanks, Sun Rays To get something you must have to try once. My Articles

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can set up your web.config to set what page the user sees if an error occurs.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      S 1 Reply Last reply
      0
      • S Sun Rays

        Hi, I have posted site on IIS. And handled Application Error in Global.asax . If writting http://localhost/testing/ then it will open a default page which is set as Default.aspx But if writting http://localhost/testing/12112 then it is giving error like 404 Page not found.. So how to handle this errors.. as its not Begin Request so cant figure it out . Any settings in IIS ?

        Thanks, Sun Rays To get something you must have to try once. My Articles

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        You can turn on custom errors in web.config file where you can redirect users to an error page

        We are not a Code Charity

        S 1 Reply Last reply
        0
        • C Christian Graus

          You can set up your web.config to set what page the user sees if an error occurs.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S Offline
          S Offline
          Sun Rays
          wrote on last edited by
          #4

          Hi, thanks for your reply. But I am still getting the same error. Have done change in web.config. But no hope..

          Thanks, Sun Rays To get something you must have to try once. My Articles

          C 1 Reply Last reply
          0
          • E eyeseetee

            You can turn on custom errors in web.config file where you can redirect users to an error page

            We are not a Code Charity

            S Offline
            S Offline
            Sun Rays
            wrote on last edited by
            #5

            Hi, thanks for your reply. But I am still getting the same error. Have done change in web.config. But no hope.

            Thanks, Sun Rays To get something you must have to try once. My Articles

            1 Reply Last reply
            0
            • S Sun Rays

              Hi, thanks for your reply. But I am still getting the same error. Have done change in web.config. But no hope..

              Thanks, Sun Rays To get something you must have to try once. My Articles

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Perhaps if you post your web config ? <customErrors defaultRedirect="home.aspx" mode="On"> <error statusCode="404" redirect="home.aspx"/> </customErrors> is what I use.

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              S 1 Reply Last reply
              0
              • C Christian Graus

                Perhaps if you post your web config ? <customErrors defaultRedirect="home.aspx" mode="On"> <error statusCode="404" redirect="home.aspx"/> </customErrors> is what I use.

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                S Offline
                S Offline
                Sun Rays
                wrote on last edited by
                #7

                Christian Graus wrote:

                Nope its not working. If running through IIS, its not working. Still giving the same error.. Page not found. After deploy on IIS giving name as "Test", if writting localhost/Test then its opening default page i.e. Default.aspx but rather writting localhost/Test if writting localhost/Test/test Then its giving error because there isnt any folder names test. I want to handle this kind of errors.

                Thanks, Sun Rays To get something you must have to try once. My Articles

                C 1 Reply Last reply
                0
                • S Sun Rays

                  Christian Graus wrote:

                  Nope its not working. If running through IIS, its not working. Still giving the same error.. Page not found. After deploy on IIS giving name as "Test", if writting localhost/Test then its opening default page i.e. Default.aspx but rather writting localhost/Test if writting localhost/Test/test Then its giving error because there isnt any folder names test. I want to handle this kind of errors.

                  Thanks, Sun Rays To get something you must have to try once. My Articles

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  There's a custom errors tab in IIS if you right click on the site and choose properties

                  Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  S 1 Reply Last reply
                  0
                  • C Christian Graus

                    There's a custom errors tab in IIS if you right click on the site and choose properties

                    Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    S Offline
                    S Offline
                    Sun Rays
                    wrote on last edited by
                    #9

                    Hi, have checked Custom Error tab. but here I must have to choose message type = URL. and if giving URL = 'D:/IIS/Testing/Error.aspx' then its not taking this URL. I must have to place Error file in '/iisHelp/common/' folder. This folder path is 'C:\WINNT\help\iisHelp\common\'. but cant give aspx page as its giving error bcoz aspx page cant run dependant. So must have to use html page. any other possibilities ?

                    Thanks, Sun Rays To get something you must have to try once. My Articles

                    C 1 Reply Last reply
                    0
                    • S Sun Rays

                      Hi, have checked Custom Error tab. but here I must have to choose message type = URL. and if giving URL = 'D:/IIS/Testing/Error.aspx' then its not taking this URL. I must have to place Error file in '/iisHelp/common/' folder. This folder path is 'C:\WINNT\help\iisHelp\common\'. but cant give aspx page as its giving error bcoz aspx page cant run dependant. So must have to use html page. any other possibilities ?

                      Thanks, Sun Rays To get something you must have to try once. My Articles

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #10

                      Sun Rays ny other possibilities ?

                      No. What makes you think/worry about users who come to your site and type in random folder names ?

                      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                      S 1 Reply Last reply
                      0
                      • C Christian Graus

                        Sun Rays ny other possibilities ?

                        No. What makes you think/worry about users who come to your site and type in random folder names ?

                        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                        S Offline
                        S Offline
                        Sun Rays
                        wrote on last edited by
                        #11

                        Oh yes dts true, but wanna know if we can do something. any ways closing thread... :) Thanks for yr kindly help :cool:

                        Thanks, Sun Rays To get something you must have to try once. My Articles

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups