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

  • Home
  • SEARCH
  • 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 6470249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:05:16+00:00 2026-05-25T06:05:16+00:00

In my server side code I’m creating the following response object: var response =

  • 0

In my server side code I’m creating the following response object:

var response = HttpContext.Current.Response;
                response.Clear();
                response.AddHeader("Content-Type", content.Type);
                response.AddHeader("Content-Length", content.Length.ToString());
                response.AddHeader("Content-Disposition",
                string.Format("attachment; filename={0}; size={1}", Server.UrlEncode(content.FileName), content.Length.ToString()));
                response.Flush();
                response.BinaryWrite(content.Image);
                response.Flush();

Is it possible something in this response object is causing the 403 and if so what? If I just run a blank aspx page I don’t get a 403 it is only when it goes through the above code that a 403 occurs.

  • 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-25T06:05:16+00:00Added an answer on May 25, 2026 at 6:05 am

    The issue is unlikely to be a mime type issue (so probably not related to the content type being text/plain), though that’s an issue in itself.

    Chances are that permissions are not setup correctly, or that .NET is not registered on the server properly. Try running aspnet_regiis on the server again.

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

Sidebar

Related Questions

The following Server-Side code works: [OperationContract] public IEnumerable<object> GetBooks() { var people = new
I have a slight problem with creating a button on the server side code.
My server side code returns a value which is a JSON object on success
I've embeded the following server side code within <script> tag. <% Dim dataTable As
Developing server side code i finally got my eyes X-crossed trying to write -
When writing server-side code you need to explicitly stop execution after sending a Location:
I am trying to figure out the efficiency of my server side code. Using
I want to ask in which phase of Control Execution Lifecycle is the Server-Side-Code
For a particular project I have, no server side code is allowed. How can
I am validating a zip code using Javascript that is generated server-side, and injected

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.