Search Results

Search found 8989 results on 360 pages for 'response'.

Page 41/360 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Where should I put my breakpoint to check XML Response string from a web service?

    - by burak ozdogan
    Hi, You know, once you add a web reference to a webservice a wrapper code is generated by Visuel Studio. I was wondering if there is a method (or property) which is generated by Visual Studio whatever web service you add to your project so that I can put a breakpoint there and once the debugger stops there, I can simply read the response from web-service in an xml format (or should I say, soap). I don't want to use fiddler or a tool like that. Is it possible? Does such a place exist in the webservice wrapper code for all the added webservice Thank you, burak ozdogan

    Read the article

  • WCF - (504) The server did not return a response for this request.

    - by Sanjay Sen
    I have a JSONP WCF service,using back end as MySql.It is working properly when i run it locally with visual studio. Now we have hosted it in Windows Server 2003. Now there is very strange problem occurring.. When I do a request with fiddler which does not require much processing internally, it gives me result 200 OK with desired output as response, But when I do a request which requires some internal data processing, it gives me 504 error(gateway time out error). I also looked at C:\WINDOWS\system32\LogFiles to see if it logs any error but it shows ok result in fiddler request which is as follows: Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 2010-04-07 10:08:06 W3SVC490896353 s-ip GET /InitialState.svc/GetInitialState reference=1&pageId=18 8080 - c-ip Fiddler 200 0 64 Can anyone please help me to resolve the problem ?? Or any ideas i can try to find out why it is happening ?? Any help will be appreciated...

    Read the article

  • Asp.net Google Charts SSL handler for GeoMap

    - by Ian
    Hi All, I am trying to view Google charts in a site using SSL. Google Charts do not support SSL so if we use the standard charts, we get warning messages. My plan is to create a ASHX handler that is co9ntained in the secure site that will retrieve the content from Google and serve this to the page the user is viewing. Using VS 2008 SP1 and the included web server, my idea works perfectly for both Firefox and IE 8 & 9(Preview) and I am able to see my geomap displayed on my page as it should be. But my problem is when I publish to IIS7 the page using my handler to generate the geomap works in Firefox but not IE(every version). There are no errors anywhere or in any log files, but when i right click in IE in the area where the map should be displayed, I see the message in the context menu saying "movie not loaded" Below is the code from my handler and the aspx page. I have disabled compression in my web.config. Even in IE I am hitting all my break points and when I use the IE9 Developer tools, the web page is correctly generated with all the correct code, url's and references. If you have any better ways to accomplish this or how i can fix my problem, I will appreciate it. Thanks Ian Handler(ASHX) public void ProcessRequest(HttpContext context) { String url = "http://charts.apis.google.com/jsapi"; string query = context.Request.QueryString.ToString(); if (!string.IsNullOrEmpty(query)) { url = query; } HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(HttpUtility.UrlDecode(url))); request.UserAgent = context.Request.UserAgent; WebResponse response = request.GetResponse(); string PageContent = string.Empty; StreamReader Reader; Stream webStream = response.GetResponseStream(); string contentType = response.ContentType; context.Response.BufferOutput = true; context.Response.ContentType = contentType; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); context.Response.Cache.SetNoServerCaching(); context.Response.Cache.SetMaxAge(System.TimeSpan.Zero); string newUrl = IanLearning.Properties.Settings.Default.HandlerURL; //"https://localhost:444/googlesecurecharts.ashx?"; if (response.ContentType.Contains("javascript")) { Reader = new StreamReader(webStream); PageContent = Reader.ReadToEnd(); PageContent = PageContent.Replace("http://", newUrl + "http://"); PageContent = PageContent.Replace("charts.apis.google.com", newUrl + "charts.apis.google.com"); PageContent = PageContent.Replace(newUrl + "http://maps.google.com/maps/api/", "http://maps.google.com/maps/api/"); context.Response.Write(PageContent); } else { { byte[] bytes = ReadFully(webStream); context.Response.BinaryWrite(bytes); } } context.Response.Flush(); response.Close(); webStream.Close(); context.Response.End(); context.ApplicationInstance.CompleteRequest(); } ASPX Page <%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="googlechart.aspx.cs" Inherits="IanLearning.googlechart" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <script type='text/javascript' src='~/googlesecurecharts.ashx?'></script> <script type='text/javascript'> google.load('visualization', '1', { 'packages': ['geomap'] }); google.setOnLoadCallback(drawMap); var geomap; function drawMap() { var data = new google.visualization.DataTable(); data.addRows(6); data.addColumn('string', 'City'); data.addColumn('number', 'Sales'); data.setValue(0, 0, 'ZA'); data.setValue(0, 1, 200); data.setValue(1, 0, 'US'); data.setValue(1, 1, 300); data.setValue(2, 0, 'BR'); data.setValue(2, 1, 400); data.setValue(3, 0, 'CN'); data.setValue(3, 1, 500); data.setValue(4, 0, 'IN'); data.setValue(4, 1, 600); data.setValue(5, 0, 'ZW'); data.setValue(5, 1, 700); var options = {}; options['region'] = 'world'; options['dataMode'] = 'regions'; options['showZoomOut'] = false; var container = document.getElementById('map_canvas'); geomap = new google.visualization.GeoMap(container); google.visualization.events.addListener( geomap, 'regionClick', function(e) { drillDown(e['region']); }); geomap.draw(data, options); }; function drillDown(regionData) { alert(regionData); } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id='map_canvas'> </div> </asp:Content>

    Read the article

  • how to open a .pdf file in a panel or iframe using asp.net c#

    - by rahul
    I am trying to open a .pdf file on a button click. I want to open a .pdf file into a panel or some iframe. With the following code i can only open .pdf file in a separate window or in a save as mode. string filepath = Server.MapPath("News.pdf"); FileInfo file = new FileInfo(filepath); if (file.Exists) { Response.ClearContent(); Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = ReturnExtension(file.Extension.ToLower()); Response.TransmitFile(file.FullName); Response.End(); } how to assign a iframe to the below line Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name);

    Read the article

  • How do you build a Request-Response service using Asyncore in Python?

    - by Casey
    I have a 3rd-party protocol module (SNMP) that is built on top of asyncore. The asyncore interface is used to process response messages. What is the proper technique to design a client that generate the request-side of the protocol, while the asyncore main loop is running. I can think of two options right now: Use the loop,timeout parameters of asyncore.loop() to allow my client program time to send the appropriate request. Create a client asyncore dispatcher that will be executed in the same asyncore processing loop as the receiver. What is the best option? I'm working on the 2nd solution, cause the protocol API does not give me direct access to the asyncore parameters. Please correct me if I've misunderstood the proper technique for utilizing asyncore.

    Read the article

  • Should a given URI in a RESTful architecture always return the same response?

    - by keithjgrant
    This is kind of a follow-up question to this one. So is having a unique response for any given URI a core tenant of RESTful architecture? A lot of discussion here tends that direction, but I haven't seen it anywhere as a "hard and fast" rule. I understand the value of it (for caching, crawling, passing links, etc), but I also see things like the twitter API violate it (A request to http://api.twitter.com/1/statuses/friends_timeline.xml will vary based on the username given), and I understand there are times when it may be necessary--not to mention that a chronologically paged resource will also change as new elements are added. Should I strive for varied responses from the same URI to be eliminated altogether, or do I just accept that sometimes it isn't practical, and as long as I minimize its occurrence, I'll be in decent shape.

    Read the article

  • How do I stop Safari from caching my Servlet response?

    - by Cliff
    I'm having trouble testing a web app with Safari. My app returns wave audio data. The problem happens when I change the application and hit it again from Safari. Safari caches the original response so no matter how many times I hit refresh it seems like I've not updated anything. I can almost get around this using force refresh with Firefox but because I'm having trouble generating the wave headers using the javax.sound API Firefox only plays the first second of audio returned. A few weeks ago I tried setting the HTTP header in my servlet to prevent caching but I don't think I was setting it correctly. (What is the header for browser cache control?) This is becoming a real pain and I'm looking for any ideas, comments, or alternative approaches. I'm getting ready to try again but I figured I'd ask here in the interim to see if someone can provide help.

    Read the article

  • Java JAX-WS web-service client: how log request & response xml ?

    - by EugeneP
    I created an implementation of LoggingHandler that implements SOAPHandler It should log whenever handleMessage triggers. [ And it is never called in my case ] then : MyService service = new MyService(); MyServicePort port = service.getPortType(); now I try this: BindingProvider bindingProvider = (BindingProvider)port; bindingProvider.getBinding().getHandlerChain().add(new LoggingHandler()); I do not see any request / response xml though. Can you suggest any solution? Maybe there's other way to see output and request xml s ?

    Read the article

  • Using thread inter-communication to increase my server app's IO throughput; not sure how

    - by Howard Guo
    My server application creates a new thread for each incoming connection. Incoming requests are serialized in a BlockingQueue. There is one worker thread taking items from the queue, produce a response and send the response through socket. I have noticed a throughput issue: Currently, worker thread is responsible of sending the response message through socket, thus severely wasting processing power and throughput. I am considering: rather than sending the response itself, why not telling network IO threads to send the response? However, when I think about thread inter-communication, I cannot yet figure out how to approach it: Worker thread will produce a response, but how will it inform the response message to IO thread? Is there a standard/best practice? Thank you.

    Read the article

  • Why are all response bodies after the first blank in Cucumber?

    - by James A. Rosen
    I'm using Cucumber (0.6.3), Cucumber-Rails (0.3.0), Webrat (0.7.0), and Rails (2.3.5) for some tests. The following scenario passes just fine: Scenario: load one page Given I am on the home page Then I should see "Welcome" The following, however, fails: Scenario: load two pages Given I am on the FAQ pag When I go to the home page Then I should see "Welcome" The problem is that the second @response.body is blank. I added a Rack middleware to get a little more information: class LogEachRequest def initialize(app); @app = app; @count = 0; end def call(env) puts "Processing request # #{@count += 1)" @app.call(env) end end It shows me only one request processed. That is, it only ever prints out Processing request # 1

    Read the article

  • Why are only some of my attributes shown in the response xml of jaxws?

    - by Andreas
    I created a jaxws webservice, but it returns only some of the attributes of my objects in the response xml. E.g. public class MyObject { private String attribute1; private String attribute2; //getter and setter } But the returned XML only contains <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:getVariantsResponse xmlns:ns2="mynamespace"> <myObject> <attribute1>stringcontent</attribute1> </myObject> ....

    Read the article

  • Issues rendering image in flash via Context.Response.Write C# asp.

    - by Justin
    I am having an issue rendering images in flash via a character array. I am sending it from a webhandler via Context.Response.Write as a Base64CharacterArray. It functions 100% properly in a windows environment, however when using a Mac the image data is not retrieved correctly causing the image to appear incorrectly. It does not affect the data,however as it is rendered properly in a player which accesses the data via a webservice. I am at the end of my rope on this one. Anything will help. You can find an example at the following url http://www.discoverirelandtoday.com/photoalbum/Public/Main.aspx Thanks

    Read the article

  • Accessing an API

    - by Paritosh Praharaj
    I'm trying to build a Rails app where I have to access the Zomato API Could anybody guide me on how to create the Controller and View. Suppose I want to get the name of the restaurant from this URL: Restaurant, how do I write the controller and views for it. Currently, I'm using HTTParty gem. This is my controller code: def restaurants @response = HTTParty.get("https://api.zomato.com/v1/restaurant.json/773", :headers => {"X-Zomato-API-Key" => "MYAPIKEY"}) puts response.body, response.code, response.message, response.headers.inspect @categories = Category.where(:category_name => 'Restaurants') end And I'm trying to get the response object in the view: <%= @response.each do |item| %> <td><%= item.id %></td> <td><%= item.name %></td> <td><%= item.url %></td> <% end %> So, this shows the following error: undefined method 'id' for ["id", 773]:Array

    Read the article

  • What could be adding "Pragma:no-cache" to my response Headers? (Apache, PHP)

    - by Daniel Magliola
    I have a website whose maintenance I've inherited, which is a big hairy mess. One of the things i'm doing is improving performance. Among other things, I'm adding Expires headers to images. Now, there are some images that are served through a PHP file, and I notice that they do have the Expires header, but they also get loaded every time. Looking at Response Headers, I see this: Expires Wed, 15 Jun 2011 18:11:55 GMT Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma no-cache Which obviously explains the problem. Now, i've looked all over the code base, and it doesn't say "pragma" anywhere. .htaccess doesn't seem to have anything related either. Any ideas who could be setting those "pragma" (and "cache-control") headers, and how I can avoid it? Thanks! Daniel

    Read the article

  • How to use the Response from PHP in Objective-C?

    - by iMohammad
    I've managed to post and get datas from PHP thru objective-c. However, the response from the server looks like the following: ["ARC101","ARC112","ARC124","ARC203","ARC222","ARC251","ARC281","ARC305","ARC314","ARC344","ARC353","ARC363","ARC408","ARC416","ARC426","ARC482"] And, some responses could be more complicated like the following: [{"Code":"ARC101","Title":"Design Studio-I: Design Princi","Instructor":"Mike Cohen","Activity":"LAB","Days":"MW","Room":"B01","Bldg":"19","Section":"1","StartTime":"1310","EndTime":"1550","CallNo":"20438","Priority":null,"Open":"Open","HasAct":false,"CodeAct":null,"TitleAct":null,"InstructorAct":null] What would be your suggestion if I want to play with these datas? for example, putting them on a table ,etc. Thanks in Advance!

    Read the article

  • How I can use the HTTP headers to indicate in the Response that possibility?

    - by Cris Hong Kong CRISHK
    Finally I accomplished to cache dynamic images, css, and javascript files using HTTP headers BUT I have a problem now: I have specific dynamic images that are equal but has different URL's. For example: http://example.com/image/src/the-same-image.jpg http://example.com/image/custom/src/the-same-image2.jpg 1 and 2 has the same file content but different URL. This is a problem now because the navigator assumes that the file are different and need to be cached (due to the URL), when the real cached file is only one. I have the possibility to know if the file at the URL's are the same. How I can use the headers to indicate in the Response that possibility, and the navigator will cache only one file?

    Read the article

  • Can a proxy server cache SSL GETs? If not, would response body encryption suffice?

    - by Damian Hickey
    Can a (||any) proxy server cache content that is requested by a client over https? As the proxy server can't see the querystring, or the http headers, I reckon they can't. I'm considering a desktop application, run by a number of people behind their companies proxy. This application may access services across the internet and I'd like to take advantage of the in-built internet caching infrastructure for 'reads'. If the caching proxy servers can't cache SSL delivered content, would simply encrypting the content of a response be a viable option? I am considering all GET requests that we wish to be cachable be requested over http with the body encrypted using asymmetric encryption, where each client has the decryption key. Anytime we wish to perform a GET that is not cachable, or a POST operation, it will be performed over SSL.

    Read the article

  • How to specify HTTP expiration header? (ASP.NET MVC+IIS)

    - by Marek
    I am already using output caching in my ASP.NET MVC application. Page speed tells me to specify HTTP cache expiration for css and images in the response header. I know that the Response object contains some properties that control cache expiration. I know that these properties can be used to control HTTP caching for response that I am serving from my code: Response.Expires Response.ExpiresAbsolute Response.CacheControl or alternatively Response.AddHeader("Expires", "Thu, 01 Dec 1994 16:00:00 GMT"); The question is how do I set the Expires header for resources that are served automatically, e.g. images, css and such?

    Read the article

  • How to get response from secure site (https) using curl in php?

    - by Chirag
    Hi, i have used below code for reading the response from HTTTPS secured site using curl but it shows an error like 'Page can't be displayed" curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true); curl_setopt($ch, CURLOPT_URL, $gatewayURI); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($curl_ch, CURLOPT_CAINFO, dirname(__FILE__)."/tempcert.pem"); any help??

    Read the article

  • How do I prevent an https response from throwing an AuthenticationException with Fiddler running?

    - by Ichabod Clay
    Relative newbie to C# here :) I'm currently creating a web link scraper and having issues with the responses I'm getting when trying to login to the website via my program. I'm trying to use Fiddler to see if my program is sending the proper data, but my program is throwing an AuthenticationException when trying to get a response from the site with Fiddler running. The requests are being sent over HTTPS and Fiddler's certificate is the cause of the excepting being thrown. My question is, what can I implement into my program to have it disregard the certificate authentication? As far as my program goes, the requests and responses are being handled by HttpWebRequest and HttpWebResponse classes.

    Read the article

  • how to optimize sql server table for faster response?

    - by Thomas
    i found a in a table there are 50 thousands records and it takes one minute when we fetch data from sql server table just by issuing a sql. there are one primary key that means a already a cluster index is there. i just do not understand why it takes one minute. beside index what are the ways out there to optimize a table to get the data faster. in this situation what i need to do for faster response. also tell me how we can write always a optimize sql. please tell me all the steps in detail for optimization. thanks.

    Read the article

  • Image URL has the contentType "text/html"

    - by user1503025
    I want to implement a method to download Image from website to laptop. public static void DownloadRemoteImageFile(string uri, string fileName) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); if ((response.StatusCode == HttpStatusCode.OK || response.StatusCode == HttpStatusCode.Moved || response.StatusCode == HttpStatusCode.Redirect) && response.ContentType.StartsWith("image", StringComparison.OrdinalIgnoreCase)) { //if the remote file was found, download it using (Stream inputStream = response.GetResponseStream()) using (Stream outputStream = File.OpenWrite(fileName)) { byte[] buffer = new byte[4096]; int bytesRead; do { bytesRead = inputStream.Read(buffer, 0, buffer.Length); outputStream.Write(buffer, 0, bytesRead); } while (bytesRead != 0); } } } But the ContentType of request or response is not "image/jpg" or "image/png". They're always "text/html". I think that's why after I save them to local, they has incorrect content and I cannot view them. Can anyone has a solution here? Thanks

    Read the article

  • How do I Parse the response I get back from CURL?

    - by Daelan
    I'm sending some data to an external URL using Curl. The server sends me back a response in a string like this: trnApproved=0&trnId=10000002&messageId=7&messageText=DECLINE I can assign this string to a variable like this: $txResult = curl_exec( $ch ); echo "Result:<BR>"; echo $txResult; But how do I use the data that is sent back? I need a way to get the value of each variable sent back so that I can use it in my PHP script. Any help would be much appreciated. Thanks.

    Read the article

  • How to handle request/response propagation up and down a widget hierarchy in a GUI app?

    - by fig-gnuton
    Given a GUI application where widgets can be composed of other widgets: If the user triggers an event resulting in a lower level widget needing data from a model, what's the cleanest way to be able to send that request to a controller (or the datastore itself)? And subsequently get the response back to that widget? Presumably one wouldn't want the controller or datastore to be a singleton directly available to all levels of widgets, or is this an acceptable use of singleton? Or should a top level controller be injected as a dependency through a widget hierarchy, as far down as the lowest level widget that might need that controller? Or a different approach entirely?

    Read the article

  • Remove alert from a javascript

    - by albastar
    I've the below code from a tutorial,i want the action but i just want to remove the alert, here is the code: <script type="text/javascript"> setTimeout('read()', 10000); function read() { FB.api('/me/news.reads' + '?article=<?php echo $fbrdurl ?>&access_token=<?php echo $access_token ?>','post', function(response) { var msg = 'Error occured'; if (!response || response.error) { if (response.error) { msg += "\n\nType: "+response.error.type+"\n\nMessage: "+response.error.message; } alert(msg); } else { alert('Post was successful! Action ID: ' + response.id); } }); } </script> I've tried this: <script type="text/javascript"> setTimeout('read()', 10000); function read() { FB.api('/me/news.reads' + '?article=<?php echo $fbrdurl ?>&access_token=<?php echo $access_token ?>','post'; } </script> but not worked, thanks

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >