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. General Programming
  3. C#
  4. Error 404

Error 404

Scheduled Pinned Locked Moved C#
helpsysadminquestion
8 Posts 4 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.
  • V Offline
    V Offline
    vunhat
    wrote on last edited by
    #1

    I have being wrriten a WebServer.In Web server I send a String Http /1.1 404. When I use IE to test then it can understand but use Firefor is not why is that? please help me?

    help me

    J 1 Reply Last reply
    0
    • V vunhat

      I have being wrriten a WebServer.In Web server I send a String Http /1.1 404. When I use IE to test then it can understand but use Firefor is not why is that? please help me?

      help me

      J Offline
      J Offline
      Jasmine2501
      wrote on last edited by
      #2

      What? You need to somehow describe that better. Post it in your native language if you have to... you aren't making sense. What doesn't work in Firefox? It sounds like you are trying to cause a 404, but you are sending it through a string, and not in the HTTP headers, so FF is actually doing it right (displaying what was sent, and not an error), and IE doing something else (displaying an error although no error occurred). A web page that says "Http /1.1 404" is perfectly legal, but if it says 404 in the HEADERS, that's a page not found error.

      "Quality Software since 1983!"
      http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.

      V 1 Reply Last reply
      0
      • J Jasmine2501

        What? You need to somehow describe that better. Post it in your native language if you have to... you aren't making sense. What doesn't work in Firefox? It sounds like you are trying to cause a 404, but you are sending it through a string, and not in the HTTP headers, so FF is actually doing it right (displaying what was sent, and not an error), and IE doing something else (displaying an error although no error occurred). A web page that says "Http /1.1 404" is perfectly legal, but if it says 404 in the HEADERS, that's a page not found error.

        "Quality Software since 1983!"
        http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.

        V Offline
        V Offline
        vunhat
        wrote on last edited by
        #3

        Oh,I see,would you please show the format of code error?

        help me

        L 1 Reply Last reply
        0
        • V vunhat

          Oh,I see,would you please show the format of code error?

          help me

          L Offline
          L Offline
          leckey 0
          wrote on last edited by
          #4

          Your question still does not make sense. Can you please try to rephrase the question?

          __________________ Bob is my homeboy.

          V 1 Reply Last reply
          0
          • L leckey 0

            Your question still does not make sense. Can you please try to rephrase the question?

            __________________ Bob is my homeboy.

            V Offline
            V Offline
            vunhat
            wrote on last edited by
            #5

            OK,I have being a WebServer, client is IE or Firefox WebServer suppost http 1.0 when Client connect to server http://192.168.1.15/Nhat.txt,then Sever will do: + to client connect +create socket to transfer file to client if Nhat.txt is not Exist then transfer to client "Http /1.1 404" I see IE understand but firefor don't. I want to ask you about String code error 404

            help me

            D V 2 Replies Last reply
            0
            • V vunhat

              OK,I have being a WebServer, client is IE or Firefox WebServer suppost http 1.0 when Client connect to server http://192.168.1.15/Nhat.txt,then Sever will do: + to client connect +create socket to transfer file to client if Nhat.txt is not Exist then transfer to client "Http /1.1 404" I see IE understand but firefor don't. I want to ask you about String code error 404

              help me

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              is the 404 being automatically generated by the framework, or by custom code you wrote. IF the latter post the code generating the 404.

              -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

              1 Reply Last reply
              0
              • V vunhat

                OK,I have being a WebServer, client is IE or Firefox WebServer suppost http 1.0 when Client connect to server http://192.168.1.15/Nhat.txt,then Sever will do: + to client connect +create socket to transfer file to client if Nhat.txt is not Exist then transfer to client "Http /1.1 404" I see IE understand but firefor don't. I want to ask you about String code error 404

                help me

                V Offline
                V Offline
                vunhat
                wrote on last edited by
                #7

                int statuscode=404; String headerbuffer=null; String htmlbuffer=null; htmlbuffer="

                Error: "+statuscode+"

                "; headerbuffer="HTTP/1.0 "+statuscode+"\r\nContent-Type: text/html\r\nContent-Length: "+htmlbuffer.Length+"\r\n\r\n"; byte[] headerbuff = Encoding.UTF8.GetBytes(headerbuffer); byte[] htmlbuff = Encoding.UTF8.GetBytes(htmlbuffer); s_SocKetManageClient.Send(htmlbuff, 0, htmlbuff.Length, SocketFlags.None); s_SocKetManageClient.Send(headerbuff, 0, headerbuff.Length, SocketFlags.None); this is my code but firefor don't understand and title of IE write HTTP 404 not Found

                help me

                J 1 Reply Last reply
                0
                • V vunhat

                  int statuscode=404; String headerbuffer=null; String htmlbuffer=null; htmlbuffer="

                  Error: "+statuscode+"

                  "; headerbuffer="HTTP/1.0 "+statuscode+"\r\nContent-Type: text/html\r\nContent-Length: "+htmlbuffer.Length+"\r\n\r\n"; byte[] headerbuff = Encoding.UTF8.GetBytes(headerbuffer); byte[] htmlbuff = Encoding.UTF8.GetBytes(htmlbuffer); s_SocKetManageClient.Send(htmlbuff, 0, htmlbuff.Length, SocketFlags.None); s_SocKetManageClient.Send(headerbuff, 0, headerbuff.Length, SocketFlags.None); this is my code but firefor don't understand and title of IE write HTTP 404 not Found

                  help me

                  J Offline
                  J Offline
                  Jasmine2501
                  wrote on last edited by
                  #8

                  Why on God's Green Earth are you using Sockets for this???!!! Use the http classes in the .Net framework and save yourself a lot of headaches. This isn't even worth discussing if you want to use sockets.

                  "Quality Software since 1983!"
                  http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and 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