in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Image Upload on Godaddy

Last post 11-09-2008 11:51 AM by jbob. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 05-29-2008 12:00 PM

    Image Upload on Godaddy

    I got passed the full-text catalog problem but then I am having problem uploading product images to the site.  I applied write permission to the repository directory but still got the following error.  Any suggestion would be appreciated.

    A critical error has occurred: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

  • 05-31-2008 1:28 AM In reply to

    Re: Image Upload on Godaddy

    I am using GoDaddy as well.

    Steps to duplicate this issue: Login as admin and navigate as follows: Site Administration >> Product Management >> Product Listing >> Edit or Add a product >> Images (tab) >> Click the 3 dots next to the Image File text box >> Click the browse button >> browse to an image and click Open >> Click Upload. At this point you will see the error in the "Message Center" at the top of the window.

    I don't know the fix, but what I did was find out where those images were being uploaded and then manually ftp the images using GoDaddy's FTP interface in the Hosting Control Center.

    product images go in this path: /repository/product

    I did the same for other images my site uses.

    Filed under: ,
  • 05-31-2008 10:09 AM In reply to

    • yocuteem
    • Top 10 Contributor
    • Joined on 03-17-2008
    • Philadelphia Area
    • Posts 56

    Re: Image Upload on Godaddy

    Is GoDaddy running some sort of firewall or other utility that is preventing you from uploading?  I use WebHost4Life, and they have a firewall utility that was preventing me from uploading images.  I contacted their support and they were able to turn this off for the repository folder.  Just a thought.

    UPDATE:  I did some research on other users that were using GoDaddy and were having this same sort of issue, and I think this link might help you out:  http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/-1/postid/226906/scope/posts/Default.aspx.  Yes, it talks about DNN, but they were faced with the same permission issue, and the last couple posts tell how to resolve this sort of issue with GoDaddy.  For those that don't want to follow the link, here's a excerpt:

    "This is due to the ASP.NET worker process not having permissions to modify the underlying file system.  You will need to open a support ticket with [GoDaddy] to have the permissions modified, however, I know they are very reluctant to do so."

    "To provide the best consistency for DotNetNuke functionality the ASP.NET Worker process should have FULL permissions to the entire DNN site, including root.  SO your request to [GoDaddy Support] would go something like this. 

    To Support:

    Please modify the ASP.NET worker account permissions to have full file control to the root and all sub folders of my installation for _______ domain.  This will allow [dashCommerce] the adequate permissions to operate successfully."

    I hope that helps you.  BTW:  I modified the text to make it relevant to this post, my changes are in [square brackets].

    Tim
  • 05-31-2008 10:48 AM In reply to

    Re: Image Upload on Godaddy

    I don't think it's the firewall issue.  It is their permission settings.  I emailed them and followed their instructions but still no cigar.

    Reply from Godaddy. 

    Permissions on your site can be edited from the Hosting Control Center either through IIS Settings or File Manager. You can control your IIS Permissions for you site by using the following instructions:

    1. Log in to your Account Manager.

    2. In the My Products section, select Hosting Account List.

    3. Next to the hosting account you want to modify, click Manage Account.

    4. In the Content section of the Hosting Control Center, click the IIS Settings icon.

    5. Click the directory name to update settings on an existing directory. To set up a new directory, click Create Directory. To set up a new subdirectory, click Create Subdirectory next to the directory under which you want to create the subdirectory.

    6. Type a directory name, select the settings you want to apply to the directory, and click Continue. To set a directory as an application root in IIS, make sure the Anonymous Access and Set Application Root options are selected.

    Anonymous Access
    This enables an anonymous user to view files in a directory through a Web browser using HTTP.
    Directory Browsing
    This enables an anonymous user to view all files in the directory (in directory listing format) by pointing a Web browser to the directory path. You must also select the "Anonymous Access" setting for "Directory Browsing" to work properly.
    Set Application Root
    This enables you to set the directory or subdirectory as an IIS application root within your site. An application root is the root directory for an application. All directories and files contained within the application root are considered part of the application.

    7. Verify the settings for this directory. If the settings listed are correct, click Continue.

    NOTE TO FRONTPAGE USERS: Microsoft FrontPage manages all directory and subdirectory permissions on your Web site. If you customized directories on your Web site, or you are using another tool to build and or manage your Web site, switching to FrontPage may cause some difficulties. It overwrites all of your directory permissions and may make your site unusable.




    To modify Windows permissions using the File Manager:

    1. Log in to your Account Manager.

    2. In the My Products section, select Hosting Account List.

    3. Next to the hosting account you want to modify, click Manage Account.

    4. In the Content section, click File Manager.

    5. Select the directory or directories for which you'd like to set permissions.

    6. Click the Permissions icon.

    7. Select the permissions for the selected files.

    Read
    Selecting "Read" enables anonymous users to view files in the directory through a Web browser.
    Deselecting "Read" presents users of your Web site that reference files in the directory with a security challenge. To view the files, users must authenticate into the hosting account by entering the FTP user name and password.
    NOTE: You must select the "Anonymous Access" setting in the IIS Settings for a page in the directory to be viewable through a Web browser.

    Write
    Selecting "Write" enables anonymous users to use your site's applications to modify the contents of a directory. Select "Write" only if your site's applications create files or write to files in the directory.

    Inherit
    Selecting "Inherit" removes the explicit "Read" and "Write" permissions on a directory, so it inherits its parent directory's permissions. When a directory inherits permissions from its parent, the directory's permissions are dynamically updated when the parent's permissions are updated. Deselecting "Inherit" applies the explicit "Read" and "Write" permissions to the directory. When a directory does not inherit permissions from its parent, the directory's permissions are unaffected by updates to the parent's permissions.

    Reset all children to inherit
    Selecting "Reset all children to inherit" causes the "Inherit" setting to be cascaded to all of the subdirectories below the directory. This condition has the affect of removing any explicit permissions that may have been set.

    8. Click OK.

  • 05-31-2008 12:44 PM In reply to

    • yocuteem
    • Top 10 Contributor
    • Joined on 03-17-2008
    • Philadelphia Area
    • Posts 56

    Re: Image Upload on Godaddy

    Did you see the update to my post?

    Tim
  • 05-31-2008 12:53 PM In reply to

    Re: Image Upload on Godaddy

    Excellent. Thank you for the hard work. Being as though I have a workaround, this issue has dropped in priority. I posted another issue in the General Forum because my products are showing up when I click the category link. It counts them saying that it is showing 1 - 2 or results, but there are no little frames on the page for each product.

    Thanks.

  • 05-31-2008 2:24 PM In reply to

    Re: Image Upload on Godaddy

    Yes that's what I wrote to them yesterday after spending hours of searching on google.  And they replied with the permission settings email, yet it is still not working.  I am about to switch my hosting to one that allow me to upload.  Any suggestions?

  • 05-31-2008 4:20 PM In reply to

    • yocuteem
    • Top 10 Contributor
    • Joined on 03-17-2008
    • Philadelphia Area
    • Posts 56

    Re: Image Upload on Godaddy

    I know that this site hosts dashCommerce sites:  www.dashCommerce.com.  :)  I have been using www.webhost4life.com for about a year and a hlaf now and I've had no problems with them.

     

    Tim
  • 06-01-2008 12:05 AM In reply to

    • yocuteem
    • Top 10 Contributor
    • Joined on 03-17-2008
    • Philadelphia Area
    • Posts 56

    Re: Image Upload on Godaddy

    Hi Phil,

          I just ran into this same issue.  It turns out that my repository/product/thumbs folder was missing from my site.  It is on my local server, but for some reason it didn't get created when I published the site to my testing site on my ISP.  So, I experienced the same problem that you are having.  I created the folder and now the thumbnails are generated correctly when I click on a category.  I'm sure that you've already verified that the folder exists, but I just figured I'd let you know what I experienced.  I hope it helps.

    Tim
  • 08-18-2008 7:56 PM In reply to

    Re: Image Upload on Godaddy

    This is related to the MediumTrust security that they have on their hosting plans.  Contrary to what it seems, this is NOT happening when you try to save the file, it is happening when the code is trying to query the file system.  The code below (obtained through reflector so it is an approximate) causes the error:

    FileInfo fileInfo = new FileInfo(file.FileName);
      if (!this.IsValidFileType(fileInfo.Extension))

    Instead of using the fileInfo object, use Path.GetExtension as shown:

    if (!this.IsValidFileType(Path.GetExtension(file.FileName)))

    That is the only change needed.  Perhaps that can get put into the next version??


     

     

  • 08-18-2008 8:58 PM In reply to

    Re: Image Upload on Godaddy

    Please log this at CodePlex and we'll get it in there.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 11-09-2008 11:51 AM In reply to

    • jbob
    • Not Ranked
    • Joined on 10-10-2008
    • Posts 1

    Re: Image Upload on Godaddy

    Is there a way to implement rogerstigers' change using the web ready version? I dont have the resources to set up a development environment with the source code version at the moment.

    Can the modified code behind page be uploaded to a web ready site and somehow re-compiled, then deleted? Or can someone supply me with the web ready fix as this has been a big issue for me?

    Thanks!

Page 1 of 1 (12 items)