Support forums
in

Problem with SQL and CuteEditor

Last post 05-13-2010, 8:20 AM by Eric. 3 replies.
Sort Posts: Previous Next
  •  05-11-2010, 2:50 AM 60893

    Problem with SQL and CuteEditor

    Hi,
     
    I implemented my first cuteeditor and got it running with the standard settings (after creating the uploads folder).
     
    Now, I have to change the storage to SQL. I got the example and added the downfile.aspx and sqlfilestorage files to my app. I added the following web.config part:

    <appSettings>

    <add key="CuteEditorTempPath" value="~/CuteEditorTemp" />

    </appSettings>

    I added the folder CuteEditorTemp (this is what I already found in the forum). I created the sql table fsitems in my database.
     
    I then removed the uploads folder - and now it is not running at all wanting this folder back. If I recreate the uploads folder, then it is storing there - and not in SQL.
     
    I searched my app for the uploads and found in in admin.config of CuteEditor. Do I have to change this? Or what else do I have to do?
  •  05-11-2010, 11:52 AM 60912 in reply to 60893

    Re: Problem with SQL and CuteEditor

    a. Run in Visual Studio
     
    1. download "CustomFileProvider.zip" in http://cutesoft.net/example/howto.aspx
    2. unzip it
    3. open your visual studio
    4. click "File"==>"Open Project"==>"click file CustomFileProvider.csproj"
    5. open your sql server management studio
    6. create database called "customfileprovider"
    7. execute "SqlSample\fsitems.sql"  in database "customfileprovider"
    8. create one user such as "usera"
    9. grant database "customfileprovider" full permission to user "usera"
    10. open file "SqlSample\SqlFileStorage.cs", update the following line and match your actual setting,
         public static string ConnectionString=@"Server=(local);database=customfileprovider;uid=cute;pwd=cute;";
    11. Build project
    12. right click file "SqlSample\UseSql.aspx", click "View in Browser", you will can run this example

    b. Run in IIS

    1. download "CustomFileProvider.zip" in http://cutesoft.net/example/howto.aspx
    2. unzip it
    3. open your sql server management studio
    4. create database called "customfileprovider"
    5. execute "SqlSample\fsitems.sql"  in database "customfileprovider"
    6. create one user such as "usera"
    7. grant database "customfileprovider" full permission to user "usera"
    8. open file "SqlSample\SqlFileStorage.cs", update the following line and match your actual setting,
       public static string ConnectionString=@"Server=(local);database=customfileprovider;uid=cute;pwd=cute;";
    9. open your IIS
    10. create virtual directory called "customfileprovider" and let this virtual directory points to the unzipped folder
    11. right click file "SqlSample\UseSql.aspx" in IIS, click "Browse", you will can run this example
     
    Regards,
    Eric
  •  05-12-2010, 1:39 AM 60927 in reply to 60912

    Re: Problem with SQL and CuteEditor

    Unfortunately, I cannot open the archive - it tells me it is not a valid archive. (cannot open file. it does not appear to be a valid archive. Press F1 for help) I have WinZip and WinRar installed.
     
    Uh, it did in fact download something - so I had a look at the UseSql.aspx and found what was missing - just three lines:

    youreditorid.Setting("CuteEditorFileStorageType") = GetType(SqlFileStorage).AssemblyQualifiedName

    youreditorid.Setting("DownFile") = ResolveUrl("DownFile.Aspx")

    youreditorid.SetSecurityGalleryPath("/")
     
    Add these lines in the Page_Load of the page using the editor - then it is working!
     
    Thanks for your help.
  •  05-13-2010, 8:20 AM 60987 in reply to 60927

    Re: Problem with SQL and CuteEditor

    Please download it again, that zip file can be opened.
     
    Regards,
    Eric
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems