ITextSharp saying File not found when published to My server.
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ITextSharp saying File not found when published to My server.

  1. #1
    Join Date
    Feb 2010
    Posts
    17

    ITextSharp saying File not found when published to My server.

    0


    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?

  2. #2
    Join Date
    Jun 2010
    Location
    Cairo, Egypt
    Posts
    17

    Re: ITextSharp saying File not found when published to My server.

    hay,
    did you try to add this file inside your Asp website directory and try to read it from there?
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    010011000111010101110110001000000100110101111001001000000101000001100011

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center