ITextSharp saying File not found when published to My server


ITextSharp saying File not found when published to My server



I am using ItextSharp and I am getting a new font for it by doing this

string  fontPath = Path.GetFullPath("C:\\BMSApplicationFiles\\Fonts\\FREE3OF9.TTF"); BaseFont barCodeBase = BaseFont.CreateFont(fontPath, BaseFont.CP1252, BaseFont.EMBEDDED); 

That file is in that directory on both my dev machine and the server. When i run this on my dev machine it works fine, when published to my server I get an error saying FREE3OF9.TTF is not found as a file or a resource. I have double and triple checked that the file is in fact there on my server. My application has full trust on IIS. and IIS user has full access to this folder. And still I get this error. Very frustrating. Any ideas??

This code is Not inside the Web Application but inside a DLL class library that the web application is referencing. Do I need to add any more special permissions or something?


ASP.NET MVC: First access after some minutes slow, then every following request is fast

1:

How to get all input controls which are of type file in jquery
Your next step should be to confirm this what you think is happening is happening. Razor view engine - exception when calling Any FunctionIf you are allowed to, download and install Process Monitor which will allow you to log activity including which files are being attempted to be accessed and by which user account. Write css for individual page in mvc3 projectApply filters when monitoring of course, or else you'll end up seeing all the activity on the server.... Asp.net WebForms app that runs MVC in a subfolder If this only confirms this the correct file is being attempted to be read by expected user then maybe there's any thing up with the font. how do i have a facebook-like scrolling updates on my website showing all activityTry replacing the font file temporarily with ananother standard one (e.g. Razor view engine - How can I add Partial Viewsarial or any thing) and see what happens. MVC2 client/server validation of DateTime/Date using DataAnnotations(this is unlikely to guidance as it works on your dev machine, although might be worth a go).

2:

Most probably you have a security issue.. If you run IIS7 then check this IIS_IUSRS group has an access to the file (open file properties in explorer select Security tab etc). . If you run IIS6 then check this IUSR_MachineName account has an access to the file..

3:

I had a similar error when I tried to receive it working with IIS. Within IIS, I had to add he file directory as a virtual drive. That worked for me when I had a similar position set up. Hopefully it works for you, best of luck.


44 out of 100 based on 24 user ratings 424 reviews

!