Storage provider and Upload provider

Last post 01-31-2013, 2:12 PM by smondala. 2 replies.
Sort Posts: Previous Next
  •  01-30-2013, 8:17 PM 76761

    Storage provider and Upload provider

    Hi, I want to implement Rich Text Editor into my website but I am using MS SQL. I tried to understand http://cutesoft.net/forums/thread/74747.aspx but I think it is not applicable to ASP.NET MVC.

     

    May I ask any assitance to implement this into my website?

     

    Thanks 

  •  01-31-2013, 12:55 PM 76766 in reply to 76761

    Re: Storage provider and Upload provider

    Hi smondala,

     

    The database is not the necessary part for RichTextEditor, if you do not need to store the files into database, then please refer to http://www.richtexteditor.com/deployment/rich-text-editor-aspnet.aspx, it shows you the full steps to deploy the RichTextEditor into your site. And the RichTextEditor will work for asp.net and mvc both.

     

     Here are the full steps to store the files into ms sql database, hopl it help.

    Sql File Provider Notes

    The following guide shows the steps to config MSSQL Server file provider in RichTextEditor.

    1. Add Provider code to project

    Copy SqlFileProvider.cs file to your application App_Code folder.

    2. Create file storage items table in database

    Execute fsitems.sql against your existing database or create a new database.

    3. Set sql connection string to SqlFileProvider

    Update SqlFileProvider.cs to use your custom connection string.

    static public string ConnectionString
    {
      get
      {
        return "server=(local);database=rtedb;trusted_connection=false;uid=test;pwd=test;";
      }
    }

    4. Set FileProviderType of RichTextEditor and copy download.ashx to your application

    Copy SqlFileProvider/download.ashx to your website folder, you can rename it.

    Use SetSecurity method to set the FileProviderType.

    Editor1.SetSecurity("*", "*", "FileProviderType", typeof(SqlFileProvider).AssemblyQualifiedName);
    Editor1.SetSecurity("*", "*", "StoragePath", "/");
    Editor1.SetSecurity("*", "*", "FileProviderArg0", "download.ashx?file=");
     

    Regards,

     

    Ken 

  •  01-31-2013, 2:12 PM 76767 in reply to 76766

    Re: Storage provider and Upload provider

    Thanks for the reply.

     

    It seems that download.ashx is not recognized by my asp.net MVC application. 

    I get (http error 2) when I click "image gallery" and "insert image". Please see image below.

     

     

     

    Regards,

    smondala 

View as RSS news feed in XML