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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.transfer problems

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
I am having a good deal of trouble with the server.transfer method.&nbsp;&nbsp;The method seems to be failing very regularly.<br><br>I am not really sure that server.transfer is what I should be using.&nbsp;&nbsp;I want to complete a series of actions within my asp code then automatically send the user to the next page.&nbsp;&nbsp;The actions I am performing are through server side script.&nbsp;&nbsp;<br><br>Here is the error message<br>Error Type:<br>Server object, ASP 0230 (0x80004005)<br>The call to Server.Transfer failed while loading the page.<br>/NetworkForms/Forms/General/incCommonFns.asp, line 238<br><br>If anyone has any information or a location where I can find more information I would appreciate it.<br> <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>

 
are you refering to redirecting, if so use Response.Redirect &quot;URL&quot; , also in order to use Redirect Response.Buffer must be true, and you must not have sent anyu data(or flushed any data) back to the user prior to the redirection, or you will get an error. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I am using it to redirect to another page, I have recently read an article that makes me believe it is better to use for my purposes than the response.redirect. <br><br>I will give the redirect a try though.<br><br>I do have my response.buffer=true at the top of each of my pages.&nbsp;&nbsp;In order to clear things out before redirecting or transfering should I be clearing the buffer?<br><br>for example<br>Response.clear<br>Server.transfer(&quot;someurl&quot;) <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
 
no, you just have to make sure no data is sent to the client prior to the redirection, so buffering make sure this doesnt happen, then when you want to send data to the client(if you didnt redirect) you use response.flush, and it'll flush the page currently proccessed in the buffer back to the client. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I am now getting an error in the lines of code that are supposed to make my pages expire.<br><br>Response object error 'ASP 0156 : 80004005' <br><br>Header Error <br><br>/NetworkForms/Forms/General/incCommonFns.asp, line 272 <br><br>The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content. <br><br>I was following the advice from another forum suggestion and I have included the following lines in my include file<br><br>Response.CacheControl = &quot;no-cache&quot;<br>Response.AddHeader &quot;Pragma&quot;,&quot;no-cache&quot;<br>Response.ExpiresAbsolute = Now()- 1000<br>Response.Expires = 0<br><br>These lines were not causing a problem, for quite some time, now however I am getting errors on them.&nbsp;&nbsp;I moved them to another location in the include file (to the end).&nbsp;&nbsp;As I thought they might be causing my server.transfer to fail.&nbsp;&nbsp;Now they give me the error I pasted in above.&nbsp;&nbsp;I am sure I do not understand the Response object very well.&nbsp;&nbsp;If anyone knows a good article or book explaining it could you please let me know.<br> <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
 
Now I am not having the same error.&nbsp;&nbsp;<br><br>Here is a related question.&nbsp;&nbsp;I was reading the microsoft article on Server.transfer and it mentions that the same session object is used if you use the server.transfer method.&nbsp;&nbsp;I assume that means that all the session variables maintain their values for the page transfered to.&nbsp;&nbsp;The next page I would think can also adjust the values in the session variables, and in turn have them maintained for the next page.<br><br>If I am wrong in thinking this could someone please let me know where the error in my thinking is.&nbsp;&nbsp;I would also like to know if the Response.redirect does the same thing<br><br> <p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top