Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YelpSharp C# Issue #27

Open
kushal713 opened this issue Jul 26, 2016 · 1 comment
Open

YelpSharp C# Issue #27

kushal713 opened this issue Jul 26, 2016 · 1 comment

Comments

@kushal713
Copy link

Hi Justin,
Hi,
I am running the following Yelp c# call on my local machine and it works perfectly fine:-
var results = y.Search(searchOptions).Result;

However, when I host the code on the server, this very line returns the following exception:-
Message: One or more errors occurred.
Source: mscorlib
STackTrace: at 'System.Threading.Tasks.Task.ThrowIfExceptional(Boolean include TaskCancelledExceptions)\r\n at System.Threading.Tasks.Task 1.GetResultCore.......

I have also attached a screenshot of the same. Kindly help me in this as its driving me crazy.

yelperror

@kushal713
Copy link
Author

Hi,
I debugged the dll and it sends the StatusCode as 'NotAcceptable'. This is the response.Content:-

"\r\n\r\n\r\n\r\n406 - Client browser does not accept the MIME type of the requested page.\r\n\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n\r\n\r\n\r\n

Server Error

\r\n
\r\n
\r\n
406 - Client browser does not accept the MIME type of the requested page.

\r\n
The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.

\r\n
\r\n
\r\n\r\n\r\n"
I see this line in particular in the response:-
406 - Client browser does not accept the MIME type of the requested page.\r\n

The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.

Can you tell me now if you may be aware of this or a workaround? What MIME type is it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant