Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 564057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:43:34+00:00 2026-05-13T12:43:34+00:00

ASP.NET 3.5, IIS7 In my Global.asax’s Application_BeginRequest, I need to extract from the request’s

  • 0

ASP.NET 3.5, IIS7

In my Global.asax’s Application_BeginRequest, I need to extract from the request’s URL an entirely seperate URL that’s been embedded in it without using query string.

The solution I came up with was to hex-encode the entire target URL as if it were a directory, as follows:

http://localhost/687474703A...etc...732E6D7033/irrelevantFilename.txt

This fails for IIS7, whose ASP.NET implementation won’t tolerate a URL path greater than 260 characters.

My code controls how the request URL gets generated, and how it might embed the target URL in there, but it doesn’t have any control over that target URL value (they’re third-party URLs).

How better could I embed this target URL in my request URL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:43:34+00:00Added an answer on May 13, 2026 at 12:43 pm

    You could URL-encode it, or alternatively base-64 encode it. Both are generally more compact than hex encoding.

    Note: If the URL is longer than about 200 characters, that 260 character limit will be a problem no matter what. And if the URL is longer than 260 characters… well, you can do the math 🙂

    I don’t quite understand why you even need a separate file afterwards, though. You could use a 404 handler, or just parse right ahead for each request.

    Btw: if you have the option, you’re probably better off embedding the URL using a cookie, or as a POST argument. If that’s not an option, you can also consider using an URL-shortening service like http://bit.ly/ etc. Those URLs are really short. It all depends on where the URLs come from in the first place. If you have control over the generation of these URLs, why not just give them each a short ID, and store them in a table, and look them up when you “parse” the URL?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using IIS7.5. I have a simple ASP.NET webforms site that uses basic URL
Coding Platform ASP.NET 4.0 WebForms on IIS7.5 If I request a page blahblah.aspx which
I'm using IIS7 and ASP.NET. Basically building a simple CMS and need to handle
I have an ASP.NET MVC 3 website that works perfectly in IIS7 integrated mode.
We have a asp.net 2.0 web application that is running on IIS7. It is
Can the IIS7 URL Rewrite Module be bin deployed with an ASP.net application? Or
I am using: ASP.NET 3.5 SP1 with Web Forms Routing thru Global.asax (System.Web.Routing and
I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of
I would like the weblogs that asp.net/IIS7 uses to have the customer's username and
I have an ASP .NET website that uses cookieless sessions. When the initial request

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.