Storing images in DB works fine in VS, error on IIS

Last post 11-29-2008, 11:15 PM by pbs. 10 replies.
Sort Posts: Previous Next
  •  03-20-2007, 1:24 AM 27523

    Storing images in DB works fine in VS, error on IIS

    Hi,
     
    I followed the instructions to store images in DB. it is working ok in dev environment, but in testing environment (IIS6) it is giving me  the " CuteEditor needs read/write permission" error.
     
    This is the way that I set the properties for the editor

    txtEditor.Setting["CuteEditorFileStorageType"] = typeof(SqlFileStorage).AssemblyQualifiedName;
    txtEditor.Setting["DownFile"] = ResolveUrl("~/DownFile.Aspx");
    txtEditor.SetSecurityGalleryPath("/");

    In dev env, i can store and upload images and view the dynamic images from db. In IIS, i cannot upload any files from image upload or galery.  Any ideas?

     
    Error is:

    An unhandled exception occurred:

    Message: CuteEditor needs read/write permission to the system temp folder. If your host doesn't allow such access, you can specify a different path by adding an entry to your Web.config file. <add key='CuteEditorTempPath' value='/mydirectory' />

    Stack Trace:

    at CuteEditor.Dialogs.InsertGalleryFrame.a(Object A_0, EventArgs A_1)

    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  •  03-20-2007, 3:06 AM 27525 in reply to 27523

    Re: Storing images in DB works fine in VS, error on IIS

    hhastekin,
     
    Please open your web.config and add the following entry:
     
    <add key="CuteEditorTempPath" value="~/CuteEditorTemp" />
     
    Keep me posted.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-20-2007, 8:13 PM 27549 in reply to 27525

    Re: Storing images in DB works fine in VS, error on IIS

    Hi Adam,
     
    I added the key to appSettings node, still getting below error on IIS, but working fine in VS.
     

    An unhandled exception occurred:

    Message: CuteEditor needs read/write permission to the system temp folder. If your host doesn't allow such access, you can specify a different path by adding an entry to your Web.config file. <add key='CuteEditorTempPath' value='/mydirectory' />

    Stack Trace:

    at CuteEditor.Dialogs.InsertGalleryFrame.a(Object A_0, EventArgs A_1)

    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  •  03-20-2007, 11:23 PM 27554 in reply to 27549

    Re: Storing images in DB works fine in VS, error on IIS

    Hi Adam,
     
    I deployed the same website on my local comp IIS and it works. My comp is running XP.
     
    So what do i need to do to have same code run on IIS 6, windows server sr1?
     
    Thanks.
     
    H. 
  •  03-21-2007, 12:44 PM 27581 in reply to 27554

    Re: Storing images in DB works fine in VS, error on IIS

    hhastekin,
     
    Does the following folder CuteEditorTempPath exist in your server?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-25-2007, 11:25 PM 27718 in reply to 27581

    Re: Storing images in DB works fine in VS, error on IIS

    Hi Adam,
     
    CuteEditorTemp directory exists on the server and asp.net user has read/write access.
     
    Still getting same error.
     
    My client is waiting for this to approve the website so that we can buy the license.
     
    Please help.
     
    H.
  •  03-25-2007, 11:37 PM 27719 in reply to 27718

    Re: Storing images in DB works fine in VS, error on IIS

    hhastekin,
     
    Can you set up FTP access to your server and send it to me? [email protected]
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-27-2007, 8:35 PM 27808 in reply to 27719

    Re: Storing images in DB works fine in VS, error on IIS

    Hi Adam,
     
    I managed to fix the problem by giving full control to Network Service account on CuteEditorTemp directory.
     
    Thanks for your help.
     
    H.
  •  06-02-2008, 10:00 PM 41011 in reply to 27808

    Re: Storing images in DB works fine in VS, error on IIS

    I have the same problem, but giving full control is not a valid option as for as security is concern,
     
    Adams,
     
    Please take a look , what is wrong with this new version. old one was working great and it is working on local as well.
     
    I am getting emails from my visitors now.
     
    Thanks,
     
    hhastekin:
    Hi Adam,
     
    I managed to fix the problem by giving full control to Network Service account on CuteEditorTemp directory.
     
    Thanks for your help.
     
    H.
  •  06-03-2008, 12:02 PM 41053 in reply to 41011

    Re: Storing images in DB works fine in VS, error on IIS

    Try the steps below.
     
    1. Create a folder under your project and name it "CuteEditorTemp"; make sure ASPNET account has write permission to the above folder.
     
    2. Open your web.config and add the following entry:
     
    <add key="CuteEditorTempPath" value="~/CuteEditorTemp" />
     
    Keep me posted.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-29-2008, 11:15 PM 46418 in reply to 27523

    Re: Storing images in DB works fine in VS, error on IIS

    I found that the problem on 1&1 hosted service is that you must use real server file paths.
    1.) The \temp directory needs to be off the route directory of your web site.
    2.) CuteEditor uses the web.config file in the route directory.
    3.) After you haver created the \temp directory and assigned full premissions to network service and users, run this piece of code to get actual path:

    Partial Class _Default

    Inherits System.Web.UI.Page

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

    Dim FILENAME As String = Server.MapPath("\temp")

    Me.TextBox1.Text = FILENAME

    End Sub

    End Class

    4.) Use the path returned from the above code as follows in web.config:

    <appSettings>

    <add key="CuteEditorTempPath" value="E:\kunden\homepages\30\d999999999\temp" />

    </appSettings>

    Filed under:
View as RSS news feed in XML