http-error

VS2013 cannot add WCF service reference in solution

我与影子孤独终老i 提交于 2019-12-23 12:47:16
问题 I just created a WCF web site .net 3.5, I think by creting a default one would be enough to replicate. yet it is defficult to replicate. I have VS2013 with all updates as downloaded from my MSDN and I have windows 8.1. I must say, that a few months ago I was having the issue in some machines, so the other ones heleped and I was assuming it was something related with the installation, but now it is appearing on 3 different machines, one of them with windows 8. all of them 64 bits. The service

Android get image from url SingleClientConnManager problem

耗尽温柔 提交于 2019-12-23 04:07:27
问题 I am using following code to get the images of a logo and save it in the database. DefaultHttpClient mHttpClient = new DefaultHttpClient(); HttpGet mHttpGet; HttpResponse mHttpResponse; HttpEntity entity; for (int reportsCount = 0; reportsCount < reportsArr.length; reportsCount++) { //Make a request to get our image mHttpGet = new HttpGet(reportsArr[reportsCount][1]); byte[] categoryLogoArr = null; try { mHttpResponse = mHttpClient.execute(mHttpGet); if (mHttpResponse.getStatusLine()

Kaltura Upload Video - Error 413

删除回忆录丶 提交于 2019-12-23 03:57:20
问题 I am using the Kaltura client library for Android to upload a video. It successfully creates the entry on the server, but when it gets to the point of actually uploading the video file, it fails with Error 413 - Request Entity Too Large. KalturaMediaEntry mediaEntry = new KalturaMediaEntry(); mediaEntry.name = title; mediaEntry.mediaType = KalturaMediaType.VIDEO; mediaEntry = kalturaClient.getMediaService().add(mediaEntry); KalturaUploadToken token = new KalturaUploadToken(); token =

web.config errors fail with responseMode=“File”

浪子不回头ぞ 提交于 2019-12-21 03:58:07
问题 According to Microsoft's documentation, for static (i.e. HTML) content, web.config should read responseMode="File" for each error. Currently, my web.config includes <httpErrors errorMode="Custom"> <!-- remove statusCodes --> <error statusCode="404" path="/error/404.html" responseMode="ExecuteURL" /> </httpErrors> This returns the correct custom error page, but returns a 200 OK status code. When I change "ExecuteURL" to "File", my server does return a 404, but the custom error page is not

How do I set cookies using Python urlopen?

好久不见. 提交于 2019-12-20 17:28:07
问题 I am trying to fetch an html site using Python urlopen. I am getting this error: HTTPError: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop The code: from urllib2 import Request request = Request(url) response = urlopen(request) I understand that the server redirects to another URL and that it is looking for a cookie. How do I set the cookie it is looking for so I can read the html? 回答1: Here's an example from Python documentation, adjusted to

500.19 error in IIS7 when an error occurs

我怕爱的太早我们不能终老 提交于 2019-12-20 12:23:11
问题 Setup: Windows 7, IIS7. I am working on an app that is being viewed through the local IIS server, not the built in debugging web server. So my app url is http://localhost/foo/bar.aspx . There is no <customErrors> section in my web.config, and I haven't changed any settings in IIS. If any error occurs, I always get the following error screen: HTTP Error 500.19 - Internal Server Error Absolute physical path " C:\inetpub\custerr " is not allowed in system.webServer/httpErrors section in web

Redirection + 403 error

不羁的心 提交于 2019-12-19 22:01:59
问题 I am searching for a way to have something like that : return HttpResponseForbiddenRedirect(reverse("view_name")) an HttpResponse which redirect to a view (with its name) but still throw a 403 error I tried to do something like that : class HttpResponseForbiddenRedirect(HttpResponse): def __init__(self, redirect_to): super(HttpResponseForbiddenRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) self.status_code = 403 But it didn't work. For some reason I don't understand, I

'Length required', when posting data with cURL

风流意气都作罢 提交于 2019-12-19 16:02:42
问题 I keep getting a <h1>Length required</h1> error, when submitting a post string to a server. $cookie = "Secret cookie data here"; $searchData = array( '__EVENTTARGET' => 'ctl00$main$btn', 'ctl00$main$tbMNr' => $_GET['smth'], 'ctl00$main$tbMb' => $_GET['smthElse'], '__VIEWSTATE' => 'smthElseHere' ); // Commenting this out, as suggested by user lonesomeday //foreach ($searchData as &$elem) // This should not be necessary // $elem = urlencode($elem); // create a new cURL resource $fields = http

UrlFetch getting 404 error from spreadsheet URL

一笑奈何 提交于 2019-12-17 20:57:11
问题 I am consistently getting a 404 - Requested entity not found response when I use UrlFetchApp to export a spreadsheet as a PDF. If I put the same URL into a browser, the PDF download initiates properly. What can I do to get this example script to work? Here's an example PDF export URL, for a simple shared (read-only) spreadsheet: https://docs.google.com/spreadsheets/d/133KPZyxAATG3AAY9iCSFWabefyFvQnENkHh0dyqh7MI/export?exportFormat=pdf&format=pdf&gid=0&size=letter&portrait=true&fitw=true

urllib2 HTTP Error 400: Bad Request

廉价感情. 提交于 2019-12-17 07:24:38
问题 I have a piece of code like this host = 'http://www.bing.com/search?q=%s&go=&qs=n&sk=&sc=8-13&first=%s' % (query, page) req = urllib2.Request(host) req.add_header('User-Agent', User_Agent) response = urllib2.urlopen(req) and when I input a query greater than one word like "the dog" i get the following error. response = urllib2.urlopen(req) File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 400, in open