title: Windows Security Is bugging me, popping up three times asking for user credentials
body: <p>So i have an web application, published and deployed on IIS some pages of my web application work flawlessly while others mostly the ones with a report is causing issues. </p>
  
  <p>1) So i click the link for the report, The report gets generated YAY!!!
  <img src="https://i.stack.imgur.com/2lgkZ.png" alt="enter image description here"></p>
  
  <p>2) so the blue print button uses iTextSharp to convert to pdf and print, basically reads the data in the reportviewer, converts it to pdf, and opens with the print catalog, the below picture was taken from my local machine. </p>
  
  <p><img src="https://i.stack.imgur.com/HaItk.png" alt="enter image description here"></p>
  
  <p>3) when i click on the print button from the server i get this 
  <img src="https://i.stack.imgur.com/kfHkW.png" alt="enter image description here"></p>
  
  <p>4) After i provide the credentials i get this error page
  <img src="https://i.stack.imgur.com/rXHSr.png" alt="enter image description here"></p>
  
  <p>The error spoke about turning custom error = off i did that also in my web.config  file but the results are still the same. This same error also pops up when i insert data into the database from my application.</p>
  
  <p><strong>I Beg Help</strong> as i tried most of the options, from folder security, to identity impersonation because the data is on another server. basic authentication because on of the online articles said that identity impersonation goes well with basic authentication.
  <img src="https://i.stack.imgur.com/HiDXg.png" alt="enter image description here">
  <strong>Edit</strong></p>
  
  <p>after the customError mode was turned off, this was the error behind it. So now more research online</p>
  
  <p>I tried creating an user called NetWork Service and gave that full control to the folder and the files will inherit the permission that of the folders. i went to the virtual directory under iis and gave access for directory browsing but it is still not able to access the output.pdf, some one suggested why not change the location to the App_Data folder i did that also, but it is still denying me access, i know if not a database error because i can see the data in the report, it is not a .dll problem because the itextsharp.dll is referenced in the project, hmm it is definitely an authentication/security to the folder issue, any other suggestions will be generously appreciated.  </p>