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 8305743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:11:08+00:00 2026-06-08T18:11:08+00:00

I have some urls in the database. The problem is there urls are urls

  • 0

I have some urls in the database. The problem is there urls are urls that redirect to what I want.

I have something like this

http://www.mytestsite.com/test/test/?myphoto=true

now if I go to this site it would do a redirect to the photo so the url would end up being

http://www.mytestsite.com/test/myphoto.jpg

Is it possible to somehow scrape(download) through C# and then have it redirect and get the real url so I can download the image?

  • 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-06-08T18:11:09+00:00Added an answer on June 8, 2026 at 6:11 pm

    I think you are after the HttpWebRequest.AllowAutoRedirect Property. The property gets or sets a value that indicates whether the request should follow redirection responses.

    Example taken from MSDN

    HttpWebRequest myHttpWebRequest=(HttpWebRequest)WebRequest.Create("http://www.contoso.com");    
    myHttpWebRequest.MaximumAutomaticRedirections=1;
    myHttpWebRequest.AllowAutoRedirect=true;
    HttpWebResponse myHttpWebResponse=(HttpWebResponse)myHttpWebRequest.GetResponse();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some URLs, like http://www.example.com/something?param1=value1&param2=value2&param3=value3 and I would like to extract the parameters
I want to have URLs like this: some-company-name-deal-id-6.htm So the rewrite rule should ignore
I have a web application which uses URLs that look like this: http://library.example.com/Register.aspx?query=academic&key=586c70bb-5683-419c-aae9-e596af9ab66a (The
I have an arraylist (eg: h1) contain some urls. eg: http://www.google.com,http://www.yahoo.com,http://www.xyz.com ,..... How can
i have the following code that generate some images with urls associated from database:
I have some urls in a database with querystrings that were constructed by php,
I have some YouTube URLs stored in a database that I need to rewrite.
I have some mod_rewrite rewrites that correctly redirect the URLs to a script. From
Hi i have come across some urls of the type http://localhost/jsfweb/cat/query/ where query is
I have some HAML code like this: .clearfix =f.label t(labels.shortened_urls.fqdn_url) =f.url_field :fqdn_url, {:readonly =>

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.