Wrox Home  
Search P2P Archive for: Go

  Return to Index  

ado_dotnet thread: Reposting to URL failed using CpsHost.dll


Message #1 by milind ambegaokar <milind@g...> on Thu, 2 May 2002 13:53:39 +0500
Dear friends,

  I have a strange problem. I am using CpsHost.dll to upload documents 
from the .html form to the web server on the intranet. It was working 
very fine for the last 6 months!. Now suddenly it is not working.

When it is used, the document gets successfully uploaded to the server. 
But the problem is that it does not repost to the reposting page 
for further processing like making an entry in the database,etc.
The code that i am using is as follows.

loc_strServerURL	= Server.MapPath("/")
loc_strSitenameDir	= "http://" & Request.ServerVariables("SERVER_NAME") 
& ":" &  Request.ServerVariables("SERVER_PORT")
loc_strPathToPA		= loc_strSitenameDir & "/script/cpshost.dll"
loc_strRepostURL	= loc_strSitenameDir & "/mails/repost.asp"	
loc_strTargetURL	= loc_strSitenameDir & "/uploads/mail/send/" & Session.
SessionID 
loc_strRedirectURL	= loc_strSitenameDir & "/mails/attach.asp"
'Posting URL
loc_strPostingURL	= loc_strPathToPA & "?PUBLISH?" & loc_strRepostURL


Response.Write "<form action='" &loc_strPostingURL&"?redirectURL=" 
&Server.URLEncode(loc_strRedirectURL)& "' method='POST' name=form1 
enctype='multipart/form-data' >" &vbCrLf

Response.Write "<input type='hidden' name='targetURL' value=""" &loc_strTargetURL& 
""">" &vbCrLf
Response.Write "<input type='hidden' name='PostingURL' value=""" 
&loc_strPostingURL& """>" &vbCrLf
Response.Write "<input type='hidden' name='RedirectURL' value=""" 
&loc_strRedirectURL& """>" &vbCrLf

%>
Response.write "<input type='file' name='upfile' size='20' class='cellheadlight'>"
Response.write "<INPUT TYPE='SUBMIT' VALUE='Upload file'> 
Response.write "</form>"


Now what happens is that the document gets uploaded on the server 
in the target directory as specified by the loc_strTargetURL.
But it fails while reposting to the repost page as specified by loc_strRepostURL.


Anybody who can provide any help will be of great help to me.

From 
Milind Ambegaokar
(Gateway Web Systems Pvt. Ltd)








  Return to Index