Last post Aug 26, 2016 08:34 AM by chilluk
Aug 24, 2016 12:12 PM|chilluk|LINK
Due to issues with SSL / TLS I am having to move a legacy v2.0 app onto a more modern server - from Win 2008 (not R2) to Win 2012 R2, and from IIS 7 to IIS 8.5.
My app uses UrlRewite module to produce friendly URLs.
When testing on the new server I am having issues with postbacks, and I noticed when viewing the page source that the form actions between the 2 servers are noticeably different..
On the old IIS 7 server I get for example :
<form name="aspnetForm" method="post" action="../../../Product.aspx?PID=128123" id="aspnetForm">
On the IIS 8 server I get :
<form name="aspnetForm" method="post" action="?PID=207051" id="aspnetForm">
I can see why I am getting the postback issues obviously but why are my form tags / actions so different? As far as I can compare all setup is as identical as it can be. Is there some other setup I have overlooked somewhere that can correct this?
I don't want to have to go through the entire app making fixes if I can help it because in theory the whole thing only needs to run for a few more months until our replacement is ready!
Aug 25, 2016 09:42 AM|Chris Zhao|LINK
I read the description of the thread and I think that the issue is more related with iis.
So it is better you create a new thread on iis forum to get more solid suggestion to solve your issue.
Here following is the link for the IIS Forum.
Aug 26, 2016 08:34 AM|chilluk|LINK
That's what I thought but they are blaming .Net!
Seems to be to do with the rewriting for some reason.
Going to http://mysite.com gives (even without the actual page name in the URL) :
<form name="aspnetForm" method="post" action="Default.aspx" id="aspnetForm">
Going to a rewritten URL gives just the querystring :
<form name="aspnetForm" method="post" action="?PID=217597" id="aspnetForm">
They turned up this :
I believe what's going on in your case is not related to IIS, but rather to ASP.NET. Did you migrate from ASP.NET 2.0 to ASP.NET 4.0? Please take a look at this link: http://www.asp.net/whitepapers/aspnet4/breaking-changes#0.1__Toc256770154.
It's been documented that the form action is now rendered differently in ASP.NET 4.0, especially for the default page.
I tried on a Win 2008 R2 server with IIS 7.5 - still the same issue - also I have completely uninstalled .Net 4.5 Framework so the only one on offer now is v2.0 and still the same issue with the rewritten URLs at least!