SelectPdf File Access - iis

I am using SelectPdf to convert an HTML document to PDF.
The document has images in it and I use baseUrl in the conversion when calling ConvertHtmlString().
This all works fine when running under Visual Studio / localhost.
However, in the production environment, while the PDF is still generated from the HTML, the images are absent from the PDF.
I deploy to a Windows Server EC2 instance.
I have checked the HTML file is on the server.
I have checked the images are on the server.
I checked the file permissions for the images. Adminstrators, Users, IIS_USRS all have read access.
I assume since it works on my local computer but not EC2, that there must be a permissions issue, but not sure where else to look.

Try to set permissions for Everyone to see if it works. If that will work, it's a permissions issue. If it does not work, it's something else. You could try to insert 1-2 seconds conversion delay to allow the images to load.

Related

IIS suddenly refuses to serve PDF or RTF files; still serves DOC files

Yesterday everything was working just fine but now today when I try to access a PDF or RTF file served by IIS, I get a 404 error (when accessing it through HTTPS) or a 403 error (when accessing it through HTTP). I can still access DOC files hosted by this server. What could have possibly changed to prevent the PDF and RTF files from loading? They are being generated properly in a folder that belongs to a virtual directory being requested.
Looks like I had two similarly named folders and the files were being written to one folder and read from the other, which of course did not contain them because they were actually in the first folder. Fixing this issue solved my problem. Must have goofed up a configuration setting somewhere that this broke...

Kentico 9 media library files are 0KB after upload

I think this is a server setting issue, but when image are uploaded, the file length ends up being 0kb. I don't get any errors in the event log. I can see the file written to the server, it just has no data. I don't know where to look for a fix.
First step i would do is make sure the IIS Application pool has full security control over your CMS folder. If you don't have this set, it may not allow it to write files/modify. You can do this by right clicking on your CMS folder and going to Properties, Security, add user, and search for the user "IIS APPPOOL\TheAppPoolName" on the local machine.
If you're hosted, they may have tools in their file editor to do the same.

Unable to upload files; file upload modal displays CP Home

I am tearing my hair out with a file weird file upload issue that I have never run into before. For some reason I’m unable to upload images via the file manager (both in the file manager itself and if I upload with a custom field using the “file” fieldtype). Strangely, if I add files directly to any of the file upload directories, and sync the files, everything works fine.
After selecting the file and hitting “upload file” (see 01_choose_file.jpg) the modal window displays the CP homepage in an iframe (see 02_upload_progress.jpg).
Has anyone else seen this? Does anyone know how I can start troubleshooting this?
Background Info:
I’m running EECMS v2.5.2 - Build Date: 20120606 in MAMP (only 2 out of 15 sites I have set up locally are not working)
I have tried uploading images/files using the latest versions of Chrome, Chrome Canary, Safari, and Firefox (OS X 10.7.5)
This issue is showing up on the two latest sites I’ve started dev’ing locally on, no other site (locally or otherwise)
Things I’ve done:
Checked Apache/PHP error logs; they don’t show anything
Confirmed file upload paths and file upload directory settings are correct – I can sync files that i manually move into the various file upload directories
Permissions are fine; image manipulations and thumbnail creation work fine if I manually add files to the upload directories
Tested various other 2.5.2 installs I dev on locally and they work fine (settings on these two new sites are identical to sites that work)
Only a handful of native add-ons are enabled
“Apply XSS Filtering to uploaded files?” setting Yes or No does not make a difference
Huge thanks for any help!
I can't post images so here are links to the images:
01_choose_file.jpg: http://expressionengine.com/?ACT=51&fid=105&aid=16264_Jiof3p0V1gfEEFrpC55G&board_id=5
02_upload_progress.jpg: http://expressionengine.com/?ACT=51&fid=105&aid=16265_mjGH02xK2fIFZJI6kruP&board_id=5
I have sorted this out. I went back through to make sure I disabled all third party add-ons and I had forgotten to uninstall the "Quickee" extension http://devot-ee.com/add-ons/quickee. For now that seems to be the culprit.
I've submitted the bug to Matt (the developer) and it should be patched up soon.
The ExpressionEngine filemanager sends out a AJAX POST request to the following URL:
http://YOUR_ADMIN_CP_URL?S=0&D=cp&C=content_files_modal&M=upload_file
Have you tried loading that URL yourself? You should get a page like this
But maybe EE is trying to POST to a different URL. You can find it by uploading a large file and while it's uploading using Firebug and in the Network tab at the bottom of the list you will find the URL EE is posting to

How to setup IIS 7 using physical path directing to DropBox?

I'm using multiple computers for development and I want to be able to store my files in my dropbox folder. I went to change the physical path in IIS from c:\inetpup\wwwroot to the dropbox folder but I get this error:
The requested page cannot be accessed
because the related configuration data
for the page is invalid.
I couldn't find the config file so I was wondering if anyone had done this before or whether there a better way to sync everything nicely across several PCs?
I tried it (IIS 7.5, Win 7) and it should work just fine to let your physical path of your web look at your dropfox folder. I would guess your web.config file generally contains malformed XML (see KB942055).
I'd suggest, try to map it to an empty folder just with an index.html file and see if this error still occurs.
As a workaround, I guess you can put Dropbox in your wwwroot folder and set up a virtual directory that points to Dropbox. However, there are some security issues that may hinder you from doing so. I come across a nice tutorial on how to set up Dropbox to IIS as FTP Publishing. Hope it helps.
Hodgin's guide on using Dropbox as FTP publishing.

some files not opening properly on hosting server awardspace

I've uploaded files for my website from my home test server to my hosting account on awardspace.
It is weird that some pictures work when directlinking but others don't and I don't get why
It are jpg files, and it's in a particular folder /images
and even weirder is that with some jpg files in that folder direct linking works, but with other jpgs it doesn't. I get an 403 error, while the file is there. I can see it with filezilla....
So what is wrong? on the home test server direct linking works.
EDIT: I'm guessing it has something to do with their forbidden words list. Although it's odd as pictures do not contain text?! I certainly hope they don't enforce the list on a paid hosting account as I already ordered one...
I have been using Awardspace very recently, and used core-ftp lite ftp program to easily change permissions to read, write and execute. It all works fine with me.

Resources