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. asp.net & grabbing a code from url

asp.net & grabbing a code from url

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomwindows-adminquestion
6 Posts 2 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.
  • C Offline
    C Offline
    ConXioN
    wrote on last edited by
    #1

    I have a domain where queries will be in form www.domain.com/demo12345 demo12345 being a code I need to grab & process. I need to have a single page to process these requests and the only thing this domain does, is that it reads the code and processes it. Can I do this on that domain itself or do I need to configure a redirection in IIS and grab the code from the referrer url?

    J 1 Reply Last reply
    0
    • C ConXioN

      I have a domain where queries will be in form www.domain.com/demo12345 demo12345 being a code I need to grab & process. I need to have a single page to process these requests and the only thing this domain does, is that it reads the code and processes it. Can I do this on that domain itself or do I need to configure a redirection in IIS and grab the code from the referrer url?

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

      use this function Request.RawUrl() it returns a string so u do string manipulation to get the part u want from it hope this would help ...

      Best Regards 3ala2 :)

      C 1 Reply Last reply
      0
      • J just3ala2

        use this function Request.RawUrl() it returns a string so u do string manipulation to get the part u want from it hope this would help ...

        Best Regards 3ala2 :)

        C Offline
        C Offline
        ConXioN
        wrote on last edited by
        #3

        The only problem being that how do I pass the request to the asp.net without having .aspx in the url and how do I prevent the server considering the code as folder and returning HTTP 404 when the URI is requested? Any references?

        J 1 Reply Last reply
        0
        • C ConXioN

          The only problem being that how do I pass the request to the asp.net without having .aspx in the url and how do I prevent the server considering the code as folder and returning HTTP 404 when the URI is requested? Any references?

          J Offline
          J Offline
          just3ala2
          wrote on last edited by
          #4

          Now if u keep the class name the same and change the aspx page name to "Default" if u have a folder called "ABC123" and the "Default.aspx" page is saved in it this link will work http://localhost/YourProject/ABC123 and will redirect u to the "Default.aspx" page if this isn't helpful please post more detailed scenario ...

          Best Regards 3ala2 :)

          C 1 Reply Last reply
          0
          • J just3ala2

            Now if u keep the class name the same and change the aspx page name to "Default" if u have a folder called "ABC123" and the "Default.aspx" page is saved in it this link will work http://localhost/YourProject/ABC123 and will redirect u to the "Default.aspx" page if this isn't helpful please post more detailed scenario ...

            Best Regards 3ala2 :)

            C Offline
            C Offline
            ConXioN
            wrote on last edited by
            #5

            I'll answer this myself: Installing Wildcard Application Mappings (IIS 6.0) will configure a Web site or virtual directory to run an Internet Server API (ISAPI) application at the beginning of every request to that Web site or virtual directory, regardless of the extension of the requested file. This effectively means that no matter what was requested, it's first handled by aspnet_isapi.dll (as I configured it) After this, it's only a matter of Url Rewriting with ASP.NET Thanks for attention :)

            J 1 Reply Last reply
            0
            • C ConXioN

              I'll answer this myself: Installing Wildcard Application Mappings (IIS 6.0) will configure a Web site or virtual directory to run an Internet Server API (ISAPI) application at the beginning of every request to that Web site or virtual directory, regardless of the extension of the requested file. This effectively means that no matter what was requested, it's first handled by aspnet_isapi.dll (as I configured it) After this, it's only a matter of Url Rewriting with ASP.NET Thanks for attention :)

              J Offline
              J Offline
              just3ala2
              wrote on last edited by
              #6

              That's great man

              Best Regards 3ala2 :)

              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