- Website is ASP.NET 1.0
- Server is Windows Server 2003
- Browser is IE 6/7
- Client requests a mail merged MS Word 97 - 2003 document on the website, and the document gets created on the server.
- Need to send the document to the client browser and delete the file from the server.
Previously, the web application already did this, but after some hardware and location changes, the application no longer performs this functionality. The file still successfully gets created, but for some reason, the file does not get opened client-side.
Here is the current code:
Expand|Select|Wrap|Line Numbers
- Response.Write("<script>")
- Response.Write("var wordWin = window.open(""" http://www.domain_here.org/WebApp/WordFolder/" & strFileNm & """, ""wordWin"", ""width=800,height=600,menubar=1,resizable=1,scrollbars=yes,status=yes"");")
- Response.Write("</script>")
- Response.Write("<script>window.location.href = window.location.href;</script>")
Some additional information... Leaving Response.Write("<script>window.location.href = window.location.href;</script>") causes the client browser to open another window for a brief moment, but no option to open a word document appears, and the file disappears from the server directory. Commenting out that same line of code keeps the file on the server and no window is opened client side. I'm sort of confused about what this line actually does.
One last oddity, the file gets opened when I debug the application on a dev machine, but not when I deploy the application to their live system. I suspect there are permission issues with a remote user accessing a file stored on the server, but I'm not sure how to correct this problem...
Please please please provide me with some assistance. Been troubleshooting this for many hours :)