Http error 400

     

I have a Mac user with a problem on my site which I can reproduce. The site uses a generic handler lớn create and serve/download an Excel file và it works fine on Windows machines in IE, Chrome and FF.

Bạn đang xem: Http error 400

To emulate the MacI"m running Safari on windows with the user agent phối to Safari Mac 5.1.6.

If I then go to the URI http://www.localhost:49353/httphandlers/report.ashx?fn=octouser_MemberReport_05_12_2014_08_34_45.xlsx,I get the error, Bad Request - Invalid hostname and underneath that,HTTP Error 400. The request hostname is invalid.

If I remove sầu the http://www. from the address bar & press enter, it works fine/as expected & opens the tải về dialog.

Would anyone have sầu an idea of what I"d need to lớn vày for it to lớn work without having lớn remove thehttp://www.?

Terry.


*
jsiahaan

Contributor


4323 Points

1578 Posts


Re: HTTP Error 400. The request hostname is invalid.

Dec 05, năm trước 02:16 AM|jsiahaan|LINK
Hi,

You should you use computer name instead of localhost. Or IPhường address, & try it like this:

http://192.168.123.123:49353/httphandlers/report.ashx?fn=octouser_MemberReport_05_12_2014_08_34_45.xlsxWhere 192.168.123.123 is the IP.. address of the computer where the .xlsx is located. Locahost only valid if you browse on the same computer. Browser and .xlsx at the same computer must be without www.

Have sầu fun


Jannen SiahaanIndonesian Humanitarian Foundation
*
terryrey

Member


13 Points

131 Posts


Re: HTTPhường. Error 400. The request hostname is invalid.

Dec 05, năm trước 04:13 AM|terryrey|LINK
Hi and thanks for responding.

The URI is my dev environment so localhost is valid. The error happens both locally & on the live site as described in my post.

Terry.

Xem thêm: Mẫu Thông Báo Nghỉ Tết Dương Lịch 2020, Thông Báo Nghỉ Tết 2021


*
Shawn - MSFT

All-Star


27134 Points

2676 Posts


Re: HTTPhường Error 400. The request hostname is invalid.

Dec 08, 2014 03:57 AM|Shawn - MSFT|LINK
Hi,

For this scenario, as you say, it works fine in other web browser, such as IE, Chrome and FireFox. However, it’s not work as expected in the Safari Apple browser.

It seems that the issue is related khổng lồ the Safari browser. Maybe Apple has updated the safari, which you could refer to:

http://www.cnet.com/news/safari-for-mac-to-hide-full-web-site-addresses-too/

Besides, you could get further information from Apple support forum:

https://discussions.apple.com/welcome

Regards


We are trying khổng lồ better understvà customer views on social tư vấn experience. ClickHERE to lớn participate the survey. Thanks!
*
terryrey

Member


13 Points

131 Posts


Re: HTTPhường. Error 400. The request hostname is invalid.

Dec 08, 2014 06:13 AM|terryrey|LINK
Hi Shawn,

Thanks. I realise it is Apple related but thought that maybe someone else on the jdomain.vn would have sầu experienced it as I"m fairly sure this isn"t the first generic handler lớn be called with the Safari browser.

However, I will take your advice và post to lớn the Apple jdomain.vn and if I get an answer, will update this thread.

Terry


*
terryrey

Member


13 Points

131 Posts


Re: HTTPhường Error 400. The request hostname is invalid.

Dec 10, 2014 04:34 AM|terryrey|LINK
Haha, the answer was lớn simply drop the www prefix in the URI. It worked perfectly after that.

Terry.


‹ Previous Thread|Next Thread ›

This site is managed for Microsoft by Neudesic, LLC. | ©2021Microsoft. All rights reserved.



Chuyên mục: Domain Hosting