Sign In  Sign Up Live-Chat

Some Guidance...

Last post 04-29-2008, 10:02 PM by dmitryb. 9 replies.
Sort Posts: Previous Next
  •  04-22-2008, 1:07 PM 123562

    Some Guidance...

    You all have great products, including Aspose.Editor. I have the Aspose.Editor.Demo project working, and understand the logic. Before I venture into my own implementation, however, I was hoping you could give me some direction or alert me to some pitfalls.

    Scenario: User uploads a document via an HTMLInputFile control to the server, then transfers to another page which contains the EditorControl. The Editor control opens that file, allows user to edit it and then save/complete the process. At which time the file is saved on the server and inserted into the database. The system uses ASP.NET 2.0 forms authentication, our default browser is IE 7, and the default OS is WinXP.

    Which implementation of the Editor would work best for this scenario? Given that it is Forms-based authentication, should I used the PreloadStream() method?

    Thanks!

     

     

     
  •  04-23-2008, 1:16 AM 123654 in reply to 123562

    Re: Some Guidance...

    Hi,
    thanks for your interest in Aspose.Editor!

    ASP.NET application shall use Aspose.Editor.Client on the client (browser) and Aspose.Editor.Server on the server. Since it is ASP.NET 2.0 libraries for .NET 2.0 can be used.

    In order to use control with forms authentication either one of the following options must be used.
    - if control will load-edit-save single document each time it is created on the page PreloadStream will work best. This method doesn't call back to the server thus it doesn't interfere with the authentication,

    - if control must be able to load several documents on a single page, then it needs to communicate with the server. In this case there are two options, either you need to lower security by passing session and authentication cookies to the client, or post back page and reload control for each document (if document needs to be saved then java script is used to get document content from the editor as base64 string and pack it into the hidden field).

    Kind regards,
    Michael

     
  •  04-23-2008, 8:26 PM 123832 in reply to 123654

    Re: Some Guidance...

    Thanks, Michael.

    Since I have a single document to work with, I've loaded it via the PreLoadStream(). How would you recommend implementing saving the document back to the server or database? Should I write a custom command, or is there an inherent way to get the document from the Client?

    -Matt

     
  •  04-24-2008, 9:09 PM 124040 in reply to 123832

    Re: Some Guidance...

    Dear Matt,
    in order to save document to the server you need to invoke Send method on the client. This can be done from jscript. This method however will fail if session and authentication cookies are not passed to the control. Alternatively you can save document into the base64 string and post it back to the server.

    From the UI perspective you can either create HTML button which would invoke jscript, or ASP button/control which would post document back to the server, or you can create custom command which will appear in the menu and toolbar of the editor. Please look through the web demo for the example.

    Kind regards,
    Michael

     
  •  04-25-2008, 11:09 AM 124164 in reply to 124040

    Re: Some Guidance...

    Thanks Michael.

    I have the control using Jscript to fire a server-side event to save the document back to the database. It works great!

    I've reviewed the Aspose.Editor.Application demo project and require some assistance with customizing the Editor. All I want to do it add a custom Save button, and remove the Print buttons from the Editor. Do I need to create a seperate class library and insert a new Object into the HTML like you do in the demo project do to this? Can I somehow access the client editor control's object model from my main page and make these changes? What is the simplest way to do this?

    Thanks for all your help!

     
  •  04-27-2008, 7:51 PM 124296 in reply to 124164

    Re: Some Guidance...

    Hi,
    it seems that using separate class library is the simplest method for now. Next version will have plugins which greatly simplify this task. Initial plan was to release it this month but now we are delaying it for 3-4 weeks because of several more features we want to include which make feature set of this major release more consistent.

    Kind regards,
    Michael

     

     
  •  04-28-2008, 7:36 PM 124515 in reply to 124296

    Re: Some Guidance...

    Thanks Michael. That would be great if the next version encapsulated this functionality. I've reviewed the updated demo provided on another thread, and for some reason the project just isn't finding/loading the Aspose.Editor.Application.2005. Any reason why this wouldn't load!? The dll is in the ClientBin.

    Thanks!

     
  •  04-28-2008, 10:24 PM 124536 in reply to 124515

    Re: Some Guidance...

    If you have dll then you can reference it from the project. If you have source files for the dll then you can load its project. I've checked that zip provided on a separate thread contains application project. I've also tried to get these files and opened solution. Everything loads fine in VS2005.

    If you are talking about runtime loading of application please make sure you remove all cached instances of application dll and rebuilt 2005 version only because CLR tends to bind to a wrong version if you have built both 2003 and 2005 versions.

    Dmitry should be able to help you with that.

    Kind regards,
    Michael

     
  •  04-29-2008, 11:15 AM 124657 in reply to 124536

    Re: Some Guidance...

    Thanks Michael! I now have the project all compiling and running, but for some reason the Aspose.Editor.Application.2005 dll just isn't being found. How do I go about clearing the cache or checking which version is registered in the CLR. I haven't ever compiled or executed the 2003 dll. It is like the Object tag just can't located the DLL:

    <OBJECT id="EditorApp" classid="http:ClientBin\Aspose.Editor.Application.dll#Aspose.Editor.Client.Application" VIEWASTEXT></OBJECT>

    The DLL is compiled into the ClientBin just based on how you have the demo project set up... It is all very strange that it can't load it. Do you have any other suggestions? I may just need to table this issue for now and wait for the next release of the Editor...

    Thanks!

     
  •  04-29-2008, 10:02 PM 124751 in reply to 124657

    Re: Some Guidance...

    Attachment: Present (inaccessible)

    In order to debug the issue I suggest to follow these steps:

    First try to load the Aspose.Editor.Application.dll directly just like other file to check it is available for download. Just get it by reference (something like this http:// ... /ClientBin/Aspose.Editor.Application.dll.) Sometimes web server or client has problems with this.

    Then if everything is ok try to clear caches with the following commands:
    gacutil /cdl
    del /f /s /q "C:\Documents and Settings\[USER NAME]\Local Settings\Application Data\assembly\*.*"
    And retry to start the application. Do not forget to restart the browser on each step.

    Then try to analyze the IE debug log file. To enable IE debug mode execute the attached .reg file and restart the browser. Then start the application. As the result the debug file will be created at C:\IEHostDebug.log1.

    Hope this helps.


    Dmitry Burov
    Lead Developer, Aspose Auckland Team
     
View as RSS news feed in XML