Asp.net webForms problem : Generate an empty pdf on production Server!

Hamed Vaziri 136 Reputation points
2021-08-08T15:31:03.337+00:00

In my webForm project as follow :

  1. I have a button which user click on it
  2. call a web method (via jquery request) to extract some binary data from sql server as pdf
  3. Then give a user to download/view the pdf via browser.

This works for my development machine. However, this fails on production server and give to user an empty pdf!

Where is my problem & how to solve it?

Here is jquery request to my web method :

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,541 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hamed Vaziri 136 Reputation points
    2021-09-14T04:30:00.497+00:00

    Thanks for reply.
    I don't get null value. but the binary data which returns from sql server is an empty pdf!
    please see this link which contains my code :

    https://stackoverflow.com/questions/68642520/asp-net-webforms-problem-generate-an-empty-pdf-on-production-server

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.