<filename>cannot be accessed

test in Firefox,
When I try to open an aspose file from our production web site, please see the attached file I found from my local temp folders. I get error as below,

<<filename.xls>> cannot be accessed. The file may be
read-only, or you may be trying to a access a read-only location. Or,
the server the document is stored on may not be responding.
test in IE 6:
I was directed to the page -

The page cannot be displayed.

The open / save window does not appear, so we can’t save it to disk.
								</font><br><br><br><font face="Arial">code snippets:<br>WorkSheet.Save(this.Response, "filename.xls", ContentDisposition.Inline, new XlsSaveOptions(SaveFormat.Excel97To2003));<br><br></font><font face="Arial">Our production web site have 6 web servers. </font><br><font face="Arial">But when I run the same code on my local, the file can open correctly.</font><br><br><font face="Arial">I am using aspose.cells 5.1.3.1. I don't think I need the latest DLL.</font><br><font face="Arial">Any suggestions are welcome.</font><br>

Hi,

If it works fine on your local system, then surely it should work fine on your production server. I think may be you have not sufficient rights or complete read/write permissions to access/manipulate the file system on the server, please make sure that you have sufficient rights and have write permissions on the server’s file system/directory.

Thank you.

Does this overload of the Save method write the Excel file to a temporary folder before writing it to the Response? If so, can you tell me where so we can grant the correct permissions to the web user account?

Dear tdhack99,

Thanks for considering Aspose.

If I am not mistaken, everything is processed inside memory and don’t need any temporary files. Anyway, please wait before amjad could confirm it.

Hi,

I came across similar issues found by some users browsing the internet, see the documents for your reference if any of situation/scenario matches yours and are useful for you:
http://support.microsoft.com/kb/840640
http://support.microsoft.com/kb/835234
http://support.microsoft.com/kb/182671

Also, could you try to save the file to your file system/disk directly and then open the file if it works.

Thank you.

Amjad,

I work with Apple and our path through the code that saves to disk and opens works just fine (we queue the exports and pick up later). It is only when we decide to stream it back directly when we see this (only in our produciton environment). It sure feels like a a permisison problem somewhere so that is why we are wondering if there is a temp directory that may be used.....

Thanks,

Dan

There are a lot of problems in IE when you try to open files from a https site.

From what I have found, I guess the problem is here, in Aspose.Cells Workbook.Save method:
if (this.֞)
{
HttpCachePolicy cache = ר.Cache;
cache.SetExpires(DateTime.Now - TimeSpan.FromMinutes(1.0));
cache.SetCacheability(HttpCacheability.Private);
ר.AddHeader(“pragma”, “no-cache”);
}
ר.AddHeader(“Content-Length”, ת.ToString());

I do not think it’s good to have the cache settings on your side.
It should be us users (developers)'s decision.

Anyhow, I am expecting a latest working dll without cache settings, and try it in our production environment.

Please send it to us when it’s ready.

Hi,

Kindly save the file to stream using Aspose.Cells API, then export the stream by Response object by yourself.

Thank you.

I still want to use your Workbook.Save method, so please give us a fix.

Write the code ourselves is only a temp solution.

Hi,

Please see the example code (attached) to set Response Header if it can help you for your reference.

Also, do you have some other good sample solution on how to set response header.

Thank you.

Thanks, Amjad, we have solved this issue, it is because of our server’s setting.