Hi,
I’m currently have issues running Aspose on a hosted environment. In my local development environment it works fine.
I get the following error:
The hosted environment is running IIS 7.0 and in Server 2008.
I just copied and pasted the DLL’s into my Bin directory. I have given ‘Everyone’ access to write to the whole website folder, however I still get the error message?
Which setting am I missing?
This message was posted using Email2Forum by forever. (attachment)
Hi,
Thank you for considering Aspose.
It seems you have not set the permission correctly. Please try creating a file in that folder directly without using Aspose.
Thanks for getting back to me.
I can create files using the same web application to that same folder, without using Aspose. As i said, i have ‘Everyone’ access to write/read/modify.
I have a feeling its do with IIS7.0 and Server 2008?
Thanks
Jai
Dear Jai,
From the error message I can see the exception is thrown from Aspose.Words. I will move this post to the Aspose.Words forum. The developers of Aspose.Words will help you soon.
Hi
Thanks for your request.
- You should also specify file name of output file. In your code you have specified only folder. Use the following code fore example
Dim tempPath As String = Server.MapPath(“Temp\out.AsposePdf”)
doc.Save(tempPath, SaveFormat.AsposePdf)
- You can try increasing the assembly’s trust level by selecting “Increase Assembly Trust” in “.NET Framework 2.0 Configuration” which can be found in “Control Panel” -> “Administrative Tools”. This will modify security policy based on information about the evidence of the assembly selected.
Best regards.
Hi,
Thanks for getting back to me.
I tired that, but still got the same error. I also tried
Dim xmlStream As MemoryStream = New MemoryStream()
doc.Save(xmlStream, SaveFormat.AsposePdf)
but i got the same error.
I’m a bit confused. The website’s trust level is set to ‘Full (Internal)’. And it seems the 2nd point you gave me only seems to apply to .NET 1.0. I’m using .NET 2.0.
Any other idea’s?
Please try also specifying ExportImageFolder. See the following code:
doc.SaveOptions.ExportImagesFolder = Server.MapPath(“Temp”)
Hope this helps.
Best regards.
Hi,
I did some further testing. it seems its a security issue. I’ve copied the same code into a IIS6.0 Server 2003 and it ran perfectly.
So there i something about IIS7.0 and Server 2008. Have you guys ran Aspose in that environment before?
Thanks
Jai
Hi
Thanks for your request. I don’t think that this is problem of Aspose.Words. have you tried to save or create file in your environment?
As a workaround you can try using direct conversion to PDF that is supported in the latest Aspose.Words 6.0.0. In this case you don’t need to save intermediate XML and you will be able to generate document in memory and send it directly to client browser.
https://releases.aspose.com/words/net
Best regards.
Thanks for all your help. Its not a Aspose.Words issue. Its a security issue on the nas share that our hosted environment is using. They are working on it.
Thanks
Jai