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

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
 
J

John Saunders

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.
 
P

Philippe Meunier

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...
 
J

John Saunders

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top