473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Empty POST request

Jag
Hi

I am facing a strange issue. I have 3 ASP pages in the default
website
1. auth.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. Auth Page
  4. <br />
  5. <a href = "anon.aspx">Anon Page</a>
  6. </body>
  7. </html>
  8.  

2. anon.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. Normal Page
  4. <form action = "resp.aspx" method = "post">
  5. <input type = "text" name = "un" />
  6. <input type = "submit" />
  7. </form>
  8. <br />
  9. <a href = "auth.aspx">Auth Page</a>
  10. </body>
  11. </html>
  12.  

3. resp.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. Bytes : <%= Request.TotalBytes %>
  4. </body>
  5. </html>
  6.  

In IIS, auth.aspx is set to have Integrated Windows Authentication.
The
other two have anonymous access.
Here are the actions I perform on IE7.
1. Navigate to http://localhost/anon.aspx
2. Type some text and submit the form.
3. The response shows the number of bytes correctly.
4. Click the back button on browser.
5. Navigate to auth.aspx
6. Enter required credentials, if prompted. The page loads
successfully.
7. Go back to http://localhost/anon.aspx
8. Type some text and submit the form.
9. Strangely, the response shows that zero byte was posted.

So, whenever I go to a page with IWA enabled and then move onto a
page
with anonymous access, if a form exists in that page, and the form
submission method is POST, the submission fails. The only workaround
is to close the browser and open it again.

This does not happen in Mozilla Firefox.
This does not happen when I use Fiddler with IE7.

Could someone explain what's going wrong?

Thanks.

UNT,
Jag

Jun 27 '08 #1
3 5017

I also get the same behavior. I have an ASP.NET 3.5 AJAX enabled application
that uses mixed-mode authentication. It actually uses Forms Authentication
but has a page that uses Integrated Windows Authentication and sets the Forms
Auth cookie if it authenticates properly, otherwise redirects to the normal
Forms Login page.

Now, when I deactivate IWA for all pages except the special IWA page,
posting back just sends "nothing" back to the page. Request.Form is empty,
Request.ContentLength is zero. This is annoying.

I also see it working ok from IE through Fiddler. It also works properly
from FireFox with or without Fiddler.
"Jag" wrote:
Hi

I am facing a strange issue. I have 3 ASP pages in the default
website
1. auth.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <body>
  3.         Auth Page
  4.         <br />
  5.         <a href = "anon.aspx">Anon Page</a>
  6.     </body>
  7. </html>
  8.  


2. anon.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <body>
  3.         Normal Page
  4.         <form action = "resp.aspx" method = "post">
  5.             <input type = "text" name = "un" />
  6.             <input type = "submit" />
  7.         </form>
  8.         <br />
  9.         <a href = "auth.aspx">Auth Page</a>
  10.     </body>
  11. </html>
  12.  


3. resp.aspx
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <body>
  3.         Bytes : <%= Request.TotalBytes %>
  4.     </body>
  5. </html>
  6.  


In IIS, auth.aspx is set to have Integrated Windows Authentication.
The
other two have anonymous access.
Here are the actions I perform on IE7.
1. Navigate to http://localhost/anon.aspx
2. Type some text and submit the form.
3. The response shows the number of bytes correctly.
4. Click the back button on browser.
5. Navigate to auth.aspx
6. Enter required credentials, if prompted. The page loads
successfully.
7. Go back to http://localhost/anon.aspx
8. Type some text and submit the form.
9. Strangely, the response shows that zero byte was posted.

So, whenever I go to a page with IWA enabled and then move onto a
page
with anonymous access, if a form exists in that page, and the form
submission method is POST, the submission fails. The only workaround
is to close the browser and open it again.

This does not happen in Mozilla Firefox.
This does not happen when I use Fiddler with IE7.

Could someone explain what's going wrong?

Thanks.

UNT,
Jag

Jun 27 '08 #2
After a few more tests, it seems that: if you have a IIS web application with
Anonymous access configured at root level, and one page configured with IWA
(and no Anonymous), everything works ok until you hit the IWA - protected
page. After that, if you post back from the IWA protected page on itself, it
works. Instead, if you do a cross-page post back from the IWA protected page
to an Anonymous page, it does not post any content back, although the HTTP
method used is POST. Now, after leaving the IWA protecte page, in any other
unprotected (Anonymous) page, the post back on itself does not work. But, if
you do a cross-page post back from an unprotected page to an IWA-protected
page, it posts ok. So, it seems that IE has a bug. It is reproduced in both
IE6 & 7.

On the other side, if you have your web-site configured as Anonymous & IWA,
but for one "Protected" page that has only IWA, all pages are accessed
anonymously, and post back ok on themselves or cross-page. When you hit the
protected page, it post back ok on itself. It also cross-page posts back to
an unprotected page, but now you see that the WWW-Authenticate header is sent
also to "Anonymous & IWA" pages. In this scenario post backs work ok on all
pages.

"Sergiu Damian" wrote:
>
I also get the same behavior. I have an ASP.NET 3.5 AJAX enabled application
that uses mixed-mode authentication. It actually uses Forms Authentication
but has a page that uses Integrated Windows Authentication and sets the Forms
Auth cookie if it authenticates properly, otherwise redirects to the normal
Forms Login page.

Now, when I deactivate IWA for all pages except the special IWA page,
posting back just sends "nothing" back to the page. Request.Form is empty,
Request.ContentLength is zero. This is annoying.

I also see it working ok from IE through Fiddler. It also works properly
from FireFox with or without Fiddler.
"Jag" wrote:
Hi

I am facing a strange issue. I have 3 ASP pages in the default
website
1. auth.aspx
Expand|Select|Wrap|Line Numbers
  1.  <html>
  2.      <body>
  3.          Auth Page
  4.          <br />
  5.          <a href = "anon.aspx">Anon Page</a>
  6.      </body>
  7.  </html>
  8.  

2. anon.aspx
Expand|Select|Wrap|Line Numbers
  1.  <html>
  2.      <body>
  3.          Normal Page
  4.          <form action = "resp.aspx" method = "post">
  5.              <input type = "text" name = "un" />
  6.              <input type = "submit" />
  7.          </form>
  8.          <br />
  9.          <a href = "auth.aspx">Auth Page</a>
  10.      </body>
  11.  </html>
  12.  

3. resp.aspx
Expand|Select|Wrap|Line Numbers
  1.  <html>
  2.      <body>
  3.          Bytes : <%= Request.TotalBytes %>
  4.      </body>
  5.  </html>
  6.  

In IIS, auth.aspx is set to have Integrated Windows Authentication.
The
other two have anonymous access.
Here are the actions I perform on IE7.
1. Navigate to http://localhost/anon.aspx
2. Type some text and submit the form.
3. The response shows the number of bytes correctly.
4. Click the back button on browser.
5. Navigate to auth.aspx
6. Enter required credentials, if prompted. The page loads
successfully.
7. Go back to http://localhost/anon.aspx
8. Type some text and submit the form.
9. Strangely, the response shows that zero byte was posted.

So, whenever I go to a page with IWA enabled and then move onto a
page
with anonymous access, if a form exists in that page, and the form
submission method is POST, the submission fails. The only workaround
is to close the browser and open it again.

This does not happen in Mozilla Firefox.
This does not happen when I use Fiddler with IE7.

Could someone explain what's going wrong?

Thanks.

UNT,
Jag
Jun 27 '08 #3
Jag
Hi

The IWA+Anon combo works.
Thanks for the solution

UNT,
Jag
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
13
by: Rudolf Horbas | last post by:
G'day, has any of You ever experienced the problem that posted forms deliver an empty $_POST-array? I have a form like: <form method="POST" action="https://.../result.html?qid=70"> <input...
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
7
by: al | last post by:
Greetings all, I use request.form("textbox1") to get data back to page, dim str as string str = request.form("textbox1").tostring But str is always empty after refresh???? I use asp.net...
8
by: yawnmoth | last post by:
Say I have the following HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <form action="">
3
by: xred11 | last post by:
Hi, Just switched to a new server, code work fine for 2 years, now on Win2003sp2, OK in IE6, Firefox, but ONLY 1 of 2 IE7's. One works, one doesn't. Fussed for a long time - boils down to this- ...
3
by: JMcCrillis | last post by:
I've implemented a FileUpload servlet using AJAX and JS. It appears to be working well but for one issue. I used XMLHTTP so I could intercept the response in Javascript and write it out to a field...
1
by: ERobishaw | last post by:
Using Winform app writing a HTTP Post using the following... on the server side, I get no form fields. Request.Form.AllKeys.Length = 0. If I put the field/value paris in the URL I can use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.