I’ve deployed an application to a webserver that belongs to someone else.
The application eventually gets around to rendering a word doc via
“EmitDocToClientBrowser”.
When I ts into the other machine, and access the site using the local host address "//localhost/applicationName" and then go to the page which generates the doc file, I push the button, and the doc file is rendered.
However, when I try to do this on a browser on my machine (http://123.111.122.333/applicationName), and then go to the same page, I push the button, and the application just hangs. I know that it wants to give me a word doc, because a dialog box comes up (as always) asking me about opening word files. But then it just hangs.
Maybe a firewall issue? Is there anything you can tell me to help me debug this issue?
Then it’s most probably the firewall or anti-virus or proxy configuration that prevents it from loading. But to be absolutely sure it’s not Aspose.Word to blame you can compose a small ASP.NET configuaration that sends doc file over internet without using Aspose.Word at all. Simply write the doc file into response and set response mime type to application/msword.
I agree with miklovan that this seems to be a machine configuration issue. I did not go into details, but it could be either remote (e.g. firewall issue) or local (browser). No comments how to fix your network configuration issues.
I was able to get a snippet of code to render reliably with aspose.word.
The snippet executes on R, and renders when i’m in my browser at M (my local machine).
I also have a snippet of code that fails *mostly*. (like, 9 times out of 10). Unfortunately, the code *always* succeeds when I look at it running on my local machine.
So, the first question is, if the code fails to render intermittently, could it *still* be a configuration issue?
so, there are two tests here. Emit.aspx and EmitTable.aspx
emit.aspx always works everywhere. emitTable.aspx always works on my local machines and within my local network, but *usually* fails when running on the deployed server.
for instance, if you were to go to: http://testing.studentEfolio.org/wwt/emitTable.aspx, you would *likely* witness it fail. The file there is exactly what’s in EmitTable.aspx in the zip file.
I can find nothing criminal in your code. Although I’ve streamlined it a little according to our recommendations. Among changes I’ve made:
The license file included in dll as an embedded resource.
The license activation code moved to Application_Start in global.asax file.
There is no need of using Word class. It’s for COM interop only. So I’ve removed it.
You can use Response instead of HttpContext.Current.Response and Request instead of HttpContext.Current.Request and Server.MapPath instead of HttpContext.Current.Request.MapPath. They are basically identical but more concise.
I’ve added Response.End() to the end of Page_Load handler just in case.
But all these changes are basically cosmetics and probably have nothing to do with your problems.
You should really contact your system administrator on this.