invalid url and proxy

S

sviau

since rewriting our site from asp to asp.net, weve receveid many complaints
from users stating that they get invalid urls, and cant access certain pages
of our site

nothing has changed in our configuration except site being written in
asp.net (from classic asp). the site is behind a Linux box with Squid 2.5

is there known issues between proxies and asp.net output..maybe with
viewstate? underscores in url?

ex:
Hi! Since you upgraded and gave the mls.ca site a new look (it's absolutely
beautiful, by the way), I cannot get a search to work. I tried advance
search to search only the city of Mission, British Columbia, and it won't
display any results. It gives me an error screen that I have copied below.
Why is this happening? Is it only happening to me? I haven't had any
problems in the past at all. Any ideas? I'm really missing mls.ca.

Thanks for your help!

This is the screen copy:

ERROR
The requested URL could not be retrieved

----------------------------------------------------------------------------
----

While trying to process the request:

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/x-shockwave-flash, */*
Referer: http://www.mls.ca/PropertySearch.aspx
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.1.4322)
Host: www.mls.ca
Content-Length: 666
Connection: Keep-Alive
Cache-Control: no-cache

__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=dDwtNDM3MzA4NDMyOzs%2B&xrootHead
er%3ASideNav%3A0%3AtxtKeywords=Community&xrootHeader%3ASideNav%3A1%3Amlsnmbr
=MLS%C2%AE&_ctl0%3AelProvinces%3A_ctl0=3&_ctl0%3AtxtCity=Mission&_ctl0%3Atxt
Street=&_ctl0%3AtxtPostalCode=&_ctl0%3AhAreaID=&sel1=1&sel2=20&_ctl0%3AelMin
Price%3A_ctl0=300000&_ctl0%3AelMaxPrice%3A_ctl0=350000&_ctl0%3AelMinRent%3A_
ctl0=-1&_ctl0%3AelMaxRent%3A_ctl0=0&_ctl0%3AelBeds%3A_ctl0=3-0&_ctl0%3AddlFe
atureType=all&_ctl0%3AelBaths%3A_ctl0=2-0&_ctl0%3AtxtRealtorName=&_ctl0%3Atx
tBrokerCompany=&_ctl0%3AddlOrder=A&_ctl0%3AddlOrderField=1&_ctl0%3AddlPageSi
ze=10&_ctl0%3A_ctl1%3AtxtNewName=&_ctl0%3AbtnSearch=Search

The following error was encountered:

a.. Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:

a.. Missing or unknown request method
b.. Missing URL
c.. Missing HTTP Identifier (HTTP/1.0)
d.. Request is too large
e.. Content-Length missing for POST or PUT requests
f.. Illegal character in hostname; underscores are not allowed
Your cache administrator is (e-mail address removed).
 
B

bruce barker

unfortunately asp.net is not w3c compliant in naming controls, and will
generate invalid names. a control name can not legally start with an "_"
(underscore), but asp.net uses this convention a lot. your proxy server is
validating the post data (and rejecting invalid posts - generally a good
idea). you might be able to turn this off.

-- bruce (sqlwork.com)
 
S

Steven Cheng[MSFT]

Hi Bruce,


Thanks for posting in the community!
From your description, you found that some certain ASP.NET web pages's
response contend can't be correctly send back to the client and your IIS
server is behind a linux proxy server. Also, this didn't occur when you're
using the classic
ASP before, yes?
If there is anything I misunderstood, please feel free to let me know.

I've view the other messages and I think bruce barker's suggestion is quite
reasonable and informative, you may have a check on your linux box to see
whether it has prehibit some certain particular characters for HTTP
content. Also, you can try turn off some certain checks on it to see
whether the situation will has any changes. Meanwhile, if you have any
questions or have any new findings, please feel free to post here with us.



Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
S

Stephane Viau

is there no way to prevent asp.net from using the underscores in naming
conrols? any solution other than asking our users in modifying their
proxies ???

thanks
stephane
 
Y

Yan-Hong Huang[MSFT]

Hello Stephane,

I think what Bruce and Steven suggested is to revise the setting of Linux
box with Squid 2.5 in server side. You don't need to change each client's
settings.

There is no easy way to change the default naming conventions in asp.net.
You can write customized HTTP handler to deal with that in theory. However,
that is a time consuming work.

So I suggest you try the above method first to see if it could resolve the
problem. If the problem still happens, please reply to this thread and we
will follow up here.

Also, I visited www.mls.ca and clicked advanced search. However, it seems
that I can't reproduce the problem here. Could you please paste here
detailed repro steps?

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stephane Viau

im not clear on what settings im supposed to change on the proxy, server
side. Im not clear on how the proxy is altering the response from the
IIS servers?

one thing that i know is the IIS server returns http 1.1 while the squid
proxy downgrades it to http 1.0; would that cause the problem?

While trying to process the request:

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
Referer: <Web Address>
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.1.4322)
Host: www.mls.ca
Content-Length: 666
Connection: Keep-Alive
Cache-Control: no-cache

__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=dDwtNDM3MzA4NDMyOzs%2B&xroot
Header%3ASideNav%3A0%3AtxtKeywords=Community&xrootHeader%3ASideNav%3A1%3
Amlsnmbr=MLS%C2%AE&_ctl0%3AelProvinces%3A_ctl0=3&_ctl0%3AtxtCity=Mission
&_ctl0%3AtxtStreet=&_ctl0%3AtxtPostalCode=&_ctl0%3AhAreaID=&sel1=1&sel2=
20&_ctl0%3AelMinPrice%3A_ctl0=300000&_ctl0%3AelMaxPrice%3A_ctl0=350000&_
ctl0%3AelMinRent%3A_ctl0=-1&_ctl0%3AelMaxRent%3A_ctl0=0&_ctl0%3AelBeds%3
A_ctl0=3-0&_ctl0%3AddlFeatureType=all&_ctl0%3AelBaths%3A_ctl0=2-0&_ctl0%
3AtxtRealtorName=&_ctl0%3AtxtBrokerCompany=&_ctl0%3AddlOrder=A&_ctl0%3Ad
dlOrderField=1&_ctl0%3AddlPageSize=10&_ctl0%3A_ctl1%3AtxtNewName=&_ctl0%
3AbtnSearch=Search


The following error was encountered:

Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:

Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed
Your cache administrator is (e-mail address removed).


thanks
stephane
 
Y

Yan-Hong Huang[MSFT]

Hello Stephane,

Thanks for your update.

I am not familar with that Linux porxy product and not sure of whether
there is such setting on it. Bruce's first reply mentioned it and I felt it
worths a try.

I just discussed with with our IIS support professionals. We can try
forcing IIS to reponse HTTP 1.0 through one registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
\ReplyWithHTTP1.1 REG_DWORD to 0 (zero)

Please refer to "IIS Registry Setting ReplyWithHTTP1.1 May Cause Problems"
http://support.microsoft.com/?id=193419 for more info on it.

Besides, does this problem happen to all of your customers? Or just some of
them? I visited that web site but can't repro the problem. I noticed there
is "Missing HTTP Identifier (HTTP/1.0)" in your error description, could
you let your client use HTTP 1.0 to see if the problem still happens to
them? We can change this setting in IE Tools menu->Internet
Options->Advanced tab.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top