Question

I've recently upgraded a page on our server from classic asp to asp.net

The page recieves postdata and saves it to a file. The page is used by many of our clients and the url (to the asp page) is hard coded into their software. This means that i cannot simply swap the old page out for the new one. I'm trying to find a way to redirect clients from the old url to the new one. I know you can do a simple redirect using IIS, but this does not cause the postdata to be redirected. I've tried setting the file to a 307 temporary redirect, this works when the data is in the formdata but other post requests such as ones using the msxml library do not work.

Basically i need to find a way in IIS to forward a post request from one page to another without losing any of the body.

Was it helpful?

Solution 2

The best way i found was to use the temporary redirect code in IIS, although this didn't work for postdata originating from the msxml library. In the end i had to write a COM library in .NET to do the hard work using the system.encoding libraries and then reference the COM library in asp

OTHER TIPS

If the two pages are within the same application, you can use Server.Transfer. This just shifts the processing from the old page to the new one, and maintains all of the request data.

You can always program (in asp.old) a loop that goes through all the form-data and insert a record with all the values in the database. You then redirect the user to your aspx-page with the id of the row in the database as a querystring parameter. Be careful if the form-data is sensitive, to apply some sort of security to make sure users wont "steal" others data by changing the querystring.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top