Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can not download excel files from a web server, help!!!

Status
Not open for further replies.

josecarlo

Programmer
Aug 22, 2000
30
PE
Hi,
I have a real serious problem. I made several web applications with ASP.NET and with a button that let you download an excel file of the information presented on the page.
Everything began to fail on tuesday 17. The option for downloading the excel file is not working. Nothing in the code has changed and nothing in the web server. the real problem is that it is not working but not for all: in some cases it works!!. Here are my diagnostics:

1. If I use IE, in some PCs I can download the files and in others I can't. I have used IE5 and IE6
2. In netscape it always works.
3. Before 17, it was working in every browser.

You can check this web page in:
(it's in spanish)

I'm not sure if this is the correct forum but ....
Please help me!!!

Bye

Jose Carlos





JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
I would probably try adding the ASPNET account to the list of users in cache_excel folder. Are you deleting the temp file right after you stream its content into the browser?
 
The files are deleted but in specific times on the day, not when the file is downloaded.
And I made several test with the IUSR_... account but I think it is not the problem. I'm not sure what the ASPNET account does so I didn't touch it.
But, because of some IE browsers can download the files without problems, I think it's not a matter of permissions or accounts.
I was checking the log that is generated on the server when two different browsers access the web, one of them fails but the other one succeds. This is what I got:

The one that failed:
URL:GET /proveedor/wfExpExcel.aspx strAno=&strMes=&strDepartamento=...
HTTP Code: 302
Browser: Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705)

URL:GET /proveedor/cache_excel/2070026418.xls
HTTP Code: 200
Browser: Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705)

The other one:
URL: GET /proveedor/wfExpExcel.aspx strAno=&strMes=&strDepartamento=....
HTTP Code: 302
Browser: Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+FunWebProducts;+.NET+CLR+1.0.3705)

URL: GET /proveedor/cache_excel/1638895331.xls
HTTP Code: 200
Browser: Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+FunWebProducts;+.NET+CLR+1.0.3705)

The only difference I can see is in the browser: One of them has ..;+FunWebProducts;, the other doesn't.

Also, the PC that failed downloading the file using IE6, didn't failed using Netscape 7.

Thanks in advance.





JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
When you start a ASP.NET web application ASPNET account will be used by the ASP.NET worker process (aspnet_wp.exe). ASPNET has only some privileges, no network access. So I would say it's safe to add this account. We have a similar process in our app, exporting Crystal reports to a PDF file on a local drive and then streaming its content into the browser. The users couldn't view the PDF, until we gave access to this directory to ASPNET account. As for different browsers being able to get it...Browser settings? Affraid, I can't be much of a help ont his one.
 
Ok, the problem is partially fixed. I changed my code from using Response.Redirect() to Response.WriteFile() and it's working now. But we can't find the real cause of the problem.

I made some tests with the ASPNET account, adding it to the cache_excel folder and to the folder of the web application itself but there was no difference.

If you still have any suggestion about this, please let me know. And thanks LV for your interest and help.




JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top