Redirect to a temporary file in my app folder (or subfolder)

  • Thread starter Thread starter Philippe Meunier
  • Start date Start date
P

Philippe Meunier

Hello,

I've built a web application that ask the user for 3 values (textboxes) and
when the user press a button (command button) the server genereates a report
in a temporary html file

My App is in the folder c:\inetpub\wwwroot\TestReport
My report is generated in c:\inetpub\wwwroot\TestReport\Tmp\Test.html

I need to set my Cookieless property to True (for something else), so in the
URL, there is a session ID that prevent me to redirect to my Temporary
report.

When I do Response.Redirect("Tmp/Test.html") it does not work, but the same
thing works when I set Cookieless to false because there is not Session ID
in the URL.
..
I also had to enable Write for ASPNET in the rights of the Tmp folder to
allow my report to be written there.

Can someone help me ? I don't know how to show my temporary report in these
circumstances
 
Philippe Meunier said:
Hello,

I've built a web application that ask the user for 3 values (textboxes) and
when the user press a button (command button) the server genereates a report
in a temporary html file

My App is in the folder c:\inetpub\wwwroot\TestReport
My report is generated in c:\inetpub\wwwroot\TestReport\Tmp\Test.html

I need to set my Cookieless property to True (for something else), so in the
URL, there is a session ID that prevent me to redirect to my Temporary
report.

When I do Response.Redirect("Tmp/Test.html") it does not work, but the same
thing works when I set Cookieless to false because there is not Session ID
in the URL.
.
I also had to enable Write for ASPNET in the rights of the Tmp folder to
allow my report to be written there.

Can someone help me ? I don't know how to show my temporary report in these
circumstances

I've never used cookieless, but it sounds like you need to append the query
string from your current URL to your new URL, or at least the part which
contains the session id.
 
Humm, I don't get exactly what you're saying

When I set Cookieless to true here's what happens :

I click on "Print Report"

The report is generated to its location.

When I do Response.Redirect("Tmp/Test.html") Internet explorer tries to open
a page that goes like this :
http://localhost/TestReport/(v0fzrr55u2jlbm45jsldsf55)/Tmp/Test.html

Which is actually not a valid URL because of the session ID, to make this
work my report would be at, but the redirect always include the Session ID :
http://localhost/TestReport/Tmp/Test.html

I don't know if it may be caused because this is not an ASPX page that is
generated but a HTML...
 
Philippe Meunier said:
Humm, I don't get exactly what you're saying

When I set Cookieless to true here's what happens :

I click on "Print Report"

The report is generated to its location.

When I do Response.Redirect("Tmp/Test.html") Internet explorer tries to open
a page that goes like this :
http://localhost/TestReport/(v0fzrr55u2jlbm45jsldsf55)/Tmp/Test.html

Which is actually not a valid URL because of the session ID, to make this
work my report would be at, but the redirect always include the Session ID :
http://localhost/TestReport/Tmp/Test.html

I don't know if it may be caused because this is not an ASPX page that is
generated but a HTML...

I forget - did you say that you've configured IIS to allow ASP.NET to
process .html files? If not, then the problem is IIS not understanding the
session ID.
 
Back
Top