Free Support Forum - aspose.com

How may concurrent users on production server access this component

Hi,<br><br>    I'm working on a C# ASP.NET application that that uses the Aspose.Words component.<br>    I'm basically creating a html dynamically and using the DocumentBuilder class to insert the html and <br>    then saving it to the Reponse stream as a word file. I was wondering how many concurrent users are     <br>    able to do this without causing the web server to fail.<br><br>    Thanks.<br>

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Have you got some errors during inserting HTML into the document? If so please provide me code that will allow me to reproduce this issue. I will investigate your issue and provide you more information.

Best regards.

Hi,

Thanks for the quick reponse. I’m thinking of purchasing this component and I need to be sure how may concurrent users are able to use this component.

It is working fine on my development machine but I’m not sure how to simulate multi user access to this component.

Any ideas?

Thanks

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Aspose components are designed to be simultaneously used by 100s and 1000s of users. Our component supports multithreading and creating several reports at the same time should work perfectly, but make sure that you are using separate Document object per each thread. One thread should use one Document object. You can test this on your side.

Best regards.

Hi,

This is the code I’ve written in the .aspx.cs file.

CultureInfo ci = new CultureInfo(language);
Session.LCID = ci.LCID;

StringBuilder builder = new StringBuilder();

StringWriter writer = new StringWriter(builder);

Server.Execute(string.Format(“ClientQuote.aspx?HeaderNumber={0}&LocalisedLanguageId={1}”, HeaderNumber, languageId), writer);

writer.Flush();
writer.Close();
writer.Dispose();

string html = builder.ToString();

ci = new CultureInfo(“en-GB”);
Session.LCID = ci.LCID;

string filename = string.Format(“Quote_{0}.doc”, HeaderNumber);

Aspose.Words.DocumentBuilder docBuilder = new Aspose.Words.DocumentBuilder();
docBuilder.InsertImage(Server.MapPath("~/Images/thebigwordGroup.gif"), Aspose.Words.Drawing.RelativeHorizontalPosition.Character, 120, Aspose.Words.Drawing.RelativeVerticalPosition.Line, 0, -1, -1, Aspose.Words.Drawing.WrapType.None);
docBuilder.InsertHtml(html);

Aspose.Words.Document doc = docBuilder.Document;
doc.Save(filename, Aspose.Words.SaveFormat.Doc, Aspose.Words.SaveType.OpenInWord, Response);

Is this OK?

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Yes, your code should work fine.

You also can use the following code:

Aspose.Words.Document doc = new Aspose.Words.Document();

Aspose.Words.DocumentBuilder docBuilder = new Aspose.Words.DocumentBuilder(doc);

docBuilder.InsertImage(Server.MapPath("~/Images/thebigwordGroup.gif"), Aspose.Words.Drawing.RelativeHorizontalPosition.Character, 120, Aspose.Words.Drawing.RelativeVerticalPosition.Line, 0, -1, -1, Aspose.Words.Drawing.WrapType.None);

docBuilder.InsertHtml(html);

doc.Save(filename, Aspose.Words.SaveFormat.Doc, Aspose.Words.SaveType.OpenInWord, Response);

Best regards.