Word.SetLicense in web-based app - no Page reference



This isn’t so much a problem as a heads-up to clear a gap in documentation.

We intend to use Aspose.Word for generating Word documents (funnily enough) from a plugin which is dynamically loaded at run time by our asp.net app.

The documentation suggests that I need to give it a path to the license file and also a Page object, which in our case we have no access to as our plugin arch does not pass the Page object around.

Assuming that this is only used for setting the content-type/content-length in the request (for when you are streaming documents straight back to the browser) I tried it and it appears I may be right as it still runs if you pass ‘null’ for this parameter. The documentation does not make this clear.

It might be worth updating the documentation in case anyone else comes across the same problem.



Hi Ross,

Thank your for your report.

Technically speaking, the Page parameter in the SetLicense method is used to retrieve the url of the page and check the domain name specified in the license.

But there is a number of conditions including what type of license you use development/deployment, web/windows and a few others that determine whether this particular check is made or not.

I suspect you might be using a development license and therefore a check for the domain name is not made (it assumes you are working on a development machine whose domain name will be different from the deployment domain) and it therefore works for you. It does some other checks for this type of license.

However, you might find (if you bought a web license for one domain) that when you use the deployment license the page parameter will be required.

It is actually a difficult question for us to distinguish between web and windows applications because of scenarios like yours where Page is not available. In the future versions we might stop making this distinction.

I think in your case you might be better off with a Windows license, rather than a Web license.

If you have any trouble and want to change the license type, please email to info@aspose.com or post in Aspose.Purchase forums and Ben Li will reply quickly.

Sorry for any inconvenience.



Thanks. When we’re ready to go we’ll grab the windows license instead. It’s kind of confusing because we are a web-app, but because we use plugins it’s a pain.

Maybe some sort of comment on the “which license do I want” page would help?


Thanks again,



We also have an enterprise web application license. Our web application uses a HTTPHandler to a class within our web application which creates a word document and streams it to the browser.

The handler is invoked via a virtual web directory (thus satisfying the “web platform” requirement). However, there is no way to obtain a Page object from the HTTP context. The windows platform version of our license is an additional $1328… I’d like to know how to set the web platform license without having to incur the additional costs for a windows platform license (which we don’t use)?

BTW, order ID is: 040902150734



Dear Ammo Collector,

We have noticed passing the Page object to SetLicense method has caused inconvenience to customers and it will enhanced later. Thank you for reporting and tolerance.

For now I have a workaround for you. Please check your email.