Errors when Trying to convert the UseSQL.aspx.cs C# page to VB.NET

  •  10-20-2005, 2:56 PM

    Errors when Trying to convert the UseSQL.aspx.cs C# page to VB.NET

    Trying to convert the UseSQL.aspx.cs C# page to VB.NET

    When this vb.net code was used:
     
    Editor1.Setting.Item("CuteEditorFileStorageType") = Type.GetType("CustomFileProvider.SqlSample.SqlFileStorage").AssemblyQualifiedName

    Editor1.Setting.Item("DownFile") = ResolveUrl("DownFile.Aspx")
    Editor1.SetSecurityGalleryPath("/")

    I got this result:

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    Line 57: Editor1.Setting.Item("CuteEditorFileStorageType") = Type.GetType("CustomFileProvider.SqlSample.SqlFileStorage").AssemblyQualifiedName



    I then changed the code to this:

    Dim c As System.Web.HttpContext
    c = HttpContext.Current
    Dim x As New CustomFileProvider.SqlSample.SqlFileStorage(c)

    Editor1.Setting.Item("CuteEditorFileStorageType") = Type.GetType("CustomFileProvider.SqlSample.SqlFileStorage").AssemblyQualifiedName

    Editor1.Setting.Item("DownFile") = ResolveUrl("DownFile.Aspx")
    Editor1.SetSecurityGalleryPath("/")

    And Got this error:

    EditorSetting not found

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Exception: EditorSetting not found

    Source Error:

    Line 30:   {
    Line 31:    c=context;
    Line 32:    setting=CuteEditor.EditorSetting.GetFromContext(c,true);
    Line 33:    
    Line 34:    //set the downloadfile RUL

    Source File: e:\my documents\my projects\ctas\rt\sqlfilestorage.cs    Line: 32



    What do I need to do to get around this error?  I think it has something todo with the HTTPContext that it is being passed?

    HELP...

    Best Regards,
    Bensch
View Complete Thread