Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
ASP.NET Core

How to Fix Rotativa PDF Generation After Deploying to IIS

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When Rotativa works locally but fails after deployment to IIS, the cause is usually a deployment difference: IIS cannot find or execute wkhtmltopdf.exe, the application-pool identity cannot read or write a required folder, the process and native binary use different architectures, or ASP.NET Core was not published with the files and hosting components it needs. Capture the exact server error first, then check those causes in order rather than changing unrelated IIS settings.

Start by identifying the failure

Do not assume every failed PDF request is an IIS executable problem. Record these facts before changing configuration:

  • Classic ASP.NET MVC on .NET Framework or ASP.NET Core.
  • The exact Rotativa package and version, target framework, and Windows Server/IIS version.
  • Whether the endpoint returns an HTTP error, an empty response, plain text, a download with zero bytes, or a PDF missing content.
  • The complete server-side exception, IIS log entry, Windows Event Viewer entry, and application log message.
  • For ASP.NET Core, whether hosting is in-process or out-of-process.

These details determine which instructions apply. Classic Rotativa and Rotativa.AspNetCore have different setup APIs, so do not copy an ASP.NET Core configuration into a .NET Framework application.

1. Verify that the deployed wkhtmltopdf executable exists

Rotativa.AspNetCore wraps wkhtmltopdf and requires the executable to be accessible to the process running the web application. Its documented default is a folder named Rotativa at the application root; it also documents configuring another relative folder. Confirm the instructions for your installed package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Epson EcoTank ET-2800 Wireless Color All-in-One Supertank Printer - Black
  • INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
  • COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
  • ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
  • HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
  1. Open the IIS site’s physical path on the server.
  2. Inspect the published directory, not your development project directory.
  3. Confirm that the expected wkhtmltopdf.exe is present beneath the configured Rotativa folder.
  4. Compare the configured relative path with the actual IIS physical root. A path that works from Visual Studio can resolve differently under IIS.
  5. Check that deployment rules did not exclude the executable, its native libraries, or the containing folder.

If the exception says that a process cannot be started or the executable cannot be found, prioritize file presence, path, deployment inclusion, and access before changing PDF switches. Do not “fix” a missing file by granting broader IIS permissions.

2. Check the IIS identity and filesystem permissions

IIS normally runs your application under an application-pool identity, not your interactive Windows account. Microsoft’s IIS guidance says to verify that this identity can access application resources and has read/write access to folders where files are read or written.

Find the identity

  1. In IIS Manager, open Application Pools.
  2. Locate the pool assigned to the site and choose Advanced Settings.
  3. Note the value of Identity (commonly ApplicationPoolIdentity or a named service account).

Grant only the required access

The identity must be able to read the application files and execute wkhtmltopdf.exe. If the action writes a generated PDF, temporary file, cache file, or log, identify that exact directory and grant the identity the minimum required read/write permission there. A narrowly scoped permission on the required folder is safer than Full Control over the site or server.

Test using the same identity that serves requests. Running the executable from an elevated administrator console does not prove that the IIS worker process can launch it. After changing one permission, recycle the pool and call the PDF endpoint again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Align process and executable architecture

Determine the architecture of both the IIS-hosted process and the native wkhtmltopdf binary. Microsoft’s IIS hosting documentation covers x86 and x64 publishing and the application-pool bitness setting for in-process ASP.NET Core deployments.

Rank #2
Sale
Epson EcoTank Photo ET-8550 Wireless Wide-Format All-in-One Tank Printer
  • CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
  • INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
  • PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
  • ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
  • An x86 application requires an x86-compatible native executable and, for an in-process deployment, an application pool with Enable 32-Bit Applications set to True.
  • An x64 application requires an x64-compatible executable and matching x64 deployment settings.
  • Do not change the pool bitness blindly: first identify how the application was published and which binary Rotativa launches.

Architecture mismatches commonly appear as a process-start failure, a native-load error, or an immediate worker-process crash. Publish and deploy the intended architecture, set the pool accordingly, recycle it, and retest.

4. For ASP.NET Core, validate publishing and IIS hosting

These checks apply only to ASP.NET Core. Microsoft’s publishing guidance states that the deployed output must include the generated web.config, which configures the ASP.NET Core Module, and that the server needs the appropriate .NET Hosting Bundle/runtime and module.

Check the published site

  • Deploy the complete dotnet publish output to the IIS site’s physical path.
  • Keep the generated web.config at the application root unless your hosting design explicitly places it elsewhere.
  • Confirm that the server has the Hosting Bundle/runtime matching the application’s target framework.
  • Verify that the ASP.NET Core Module is installed and that the site points to the folder containing the published application.

Confirm the hosting model

In-process hosting places the application inside the IIS worker process. Out-of-process hosting starts a separately managed application process behind IIS. The model changes which process, identity, and architecture you must inspect when diagnosing executable access and failures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Separate PDF-engine failures from HTML and view failures

A launched executable does not guarantee a usable PDF. If the response is blank, incomplete, or missing styles and images, inspect the HTML supplied to the renderer and the resources it requests.

  • Render the same Razor view or HTML outside the PDF action and confirm it contains the expected data.
  • Check that CSS, fonts, images, and other assets are reachable from the deployed process.
  • Verify the base URL used by your exact Rotativa package. Rotativa.AspNetCore documents that it injects a base URL by default and allows that behavior to be disabled; the correct setting depends on your package and application.
  • Look for resources that are available only on localhost, behind Windows authentication, or at a development-only path.
  • Check whether JavaScript-dependent content has finished rendering before conversion and whether external requests are blocked by firewall or proxy policy.

If the endpoint returns framework-level plain text or an MVC exception instead of a PDF, inspect the action, result type, routing, authentication, and application configuration. That response is not evidence that IIS failed to launch wkhtmltopdf.exe.

Rank #3
HP Smart Tank 5000 Wireless All-in-One Ink Tank Printer, Scanner, Copier with 2 Years of Ink Included, Best-for-Home, Cartridge-Free, Refillable and AI-Enabled. (5D1B6A)
  • SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
  • INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
  • KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
  • PREMIUM SUPPORT - Strong technical expertise to solve issues faster
  • THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.

6. A repeatable deployment checklist

  1. Write down the package, version, target framework, hosting model, server version, and exact exception.
  2. Confirm the executable exists under the deployed IIS physical root.
  3. Confirm the configured Rotativa path resolves to that file.
  4. Check read and execute access for the actual pool identity.
  5. Check read/write access for every temporary, output, cache, or log directory used by the action.
  6. Align x86/x64 publishing, native binary architecture, and pool bitness.
  7. For ASP.NET Core, verify published files, web.config, Hosting Bundle/runtime, and ASP.NET Core Module.
  8. Test the rendered HTML and its resource URLs separately from PDF conversion.
  9. Change one identified cause at a time, recycle the pool, and retest.
  10. Document the resolved path, identity, bitness, hosting model, error, and minimal change.

Common errors and targeted fixes

Symptom Likely branch Action
“The system cannot find the file” or process cannot start Missing binary or wrong path Inspect the deployed folder, Rotativa configuration, and publish inclusion.
Access denied when launching or writing Pool identity permissions Grant narrowly scoped read/execute or read/write access to the identified file or folder.
Bad image format, native-load error, or worker crash x86/x64 mismatch Match publish architecture, native binary, and pool bitness.
HTTP 500 before any PDF bytes ASP.NET/IIS hosting or action failure Inspect application logs, Event Viewer, web.config, module/runtime installation, routing, and the action result.
Blank or unstyled PDF HTML/resource or base-URL problem Check deployed URLs, authentication, CSS, fonts, images, and package-specific base-URL behavior.
Works as administrator but not through IIS Different identity or environment Retest under the pool identity and inspect its filesystem, environment variables, proxy, and network access.

Performance, reliability, and security considerations

Keep the renderer local to the application only when your deployment can reliably carry and update the native binary. Treat every PDF request as a process and resource operation: set an application-level timeout, avoid unbounded concurrent conversions, and monitor CPU, memory, temporary-file growth, and disk space. Clean up temporary files according to your application’s retention requirements.

Do not grant LocalSystem or broad server permissions as a diagnostic shortcut. Restrict write access to a dedicated directory, validate user-supplied URLs and HTML, and avoid exposing a conversion endpoint that can fetch arbitrary internal addresses. If the rendered page requires authentication, pass only the headers or cookies your security model permits and verify that secrets are not written into logs or generated documents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a hosted PDF API is a better fit

A hosted renderer can remove responsibility for installing and updating a native executable, but it changes where rendering runs and requires you to evaluate network, data-handling, availability, integration, and current service terms. The reviewed Rotativa documentation mentions rotativa.io as an Azure-hosted API version; confirm its current availability and terms directly before adopting it.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If what you need is a clean image or PDF of a public web page rather than server-side conversion of your authenticated Razor view, ScreenshotNeo provides a one-call website screenshot API. It removes cookie-consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets Claude, Cursor, and other MCP clients call screenshot tools directly.

Use the API documentation at https://screenshotneo.com/docs/ for options such as full-page capture, CSS selectors, wait conditions, custom headers and cookies, PDF paper settings, signed links, asynchronous jobs, and bulk capture.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Every plan includes the features: 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art

FAQ

Should I reinstall Rotativa on the server?

Usually no. First verify that the package’s native executable and required files were included in the published application and are reachable at the configured path.

Can a permission fix solve a blank PDF?

Permissions can prevent files or resources from being read, but a blank document after successful launch also requires checking the generated HTML, base URL, and asset requests.

Why does changing the application-pool identity sometimes appear to help?

Different identities have different filesystem and network rights. Changing identity may mask the missing permission, but the durable fix is to grant the required access to the intended least-privilege identity.

Is ScreenshotNeo a drop-in replacement for Rotativa?

No. ScreenshotNeo captures URLs through an HTTP API, while Rotativa converts application-rendered content using a local wkhtmltopdf process. Choose based on where the page is rendered and what data it can safely expose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

Fix Rotativa on IIS by proving, in order, that the deployed executable is present and correctly configured, the pool identity can access every required file and folder, the process architecture matches the native binary, ASP.NET Core hosting is complete when applicable, and the rendered HTML can load its resources. Change one verified cause at a time and record the working deployment configuration.

Quick Recap

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.