Using the following code:
<form id="form1" action="" runat="server">
(even with this code-behind in Page Load: form1.Action = string.Empty;
)
...this is the unexpected result that I get:
<form method="post" id="form1" name="form1" action="layouts/Default.aspx">
This is the expected result, that I would like your help to accomplish:
<!-- either action="" or no action attribute at all -->
<form method="post" id="form1" name="form1" action="">
The AppPool is set to run Integrated .NET v2.0.50727 (which I've verified by printing the runtime version). The .NET Framework v4.5 is installed on the server (along with Visual Studio 2012).
This is guaranteed to be some kind of dev environment issue, reason being that the very same codebase outputs action=""
for two of my colleagues in their local environments. They largely have the same system environment specifications as I do:
- Windows Server 2008 R2 64-bit
- Visual Studio 2012
- .NET Framework v4.5
- Same AppPool settings (we've double and triple checked)
- Same codebase (SVN controlled), including the exact same
web.config
This breaking change in ASP.NET v3.5 SP1 (which was better announced in v4.0) could be related. It explains the behaviour. However, it does not explain why only my runtime is getting this breaking change.
Also note that I've tried all available combinations of commands using the aspnet_regiis
tool (without avail) i.e. from the different .NET version folders and uninstalling/reinstalling and using -c
, -i
etc.