Search Results

Search found 50475 results on 2019 pages for 'rpc over http'.

Page 129/2019 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • http handlers not working on web server but works on localhost

    - by ZX12R
    i have a couple of xml files in my asp.net web application that i don't want anyone to access other than my server side code. this is what i tried.. <add verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" /> i wrote this inside the <httpHandlers> it works well on the localhost but not in the server... the server without any hesitation displays the xml file... i have no idea how to proceed... thanks in advance..:)

    Read the article

  • Sending http headers with python

    - by Niklas R
    I've set up a little script that should feed a client with html. import socket sock = socket.socket() sock.bind(('', 8080)) sock.listen(5) client, adress = sock.accept() print "Incoming:", adress print client.recv(1024) print client.send("Content-Type: text/html\n\n") client.send('<html><body></body></html>') print "Answering ..." print "Finished." import os os.system("pause") But it is shown as plain text in the browser. Can you please tell what I need to do ? I just can't find something in google that helps me.. Thanks.

    Read the article

  • Validate a XDocument against schema without the ValidationEventHandler (for use in a HTTP handler)

    - by Vaibhav Garg
    Hi everyone, (I am new to Schema validation) Regarding the following method, System.Xml.Schema.Extensions.Validate( ByVal source As System.Xml.Linq.XDocument, ByVal schemas As System.Xml.Schema.XmlSchemaSet, ByVal validationEventHandler As System.Xml.Schema.ValidationEventHandler, ByVal addSchemaInfo As Boolean) I am using it as follows inside a IHttpHandler - Try Dim xsd As XmlReader = XmlReader.Create(context.Server.MapPath("~/App_Data/MySchema.xsd")) Dim schemas As New XmlSchemaSet() : schemas.Add("myNameSpace", xsd) : xsd.Close() myXDoxumentOdj.Validate(schemas, Function(s As Object, e As ValidationEventArgs) SchemaError(s, e, context), True) Catch ex1 As Threading.ThreadAbortException 'manage schema error' Return Catch ex As Exception 'manage other errors' End Try The handler- Function SchemaError(ByVal s As Object, ByVal e As ValidationEventArgs, ByVal c As HttpContext) As Object If c Is Nothing Then c = HttpContext.Current If c IsNot Nothing Then HttpContext.Current.Response.Write(e.Message) HttpContext.Current.Response.End() End If Return New Object() End Function This is working fine for me at present but looks very weak. I do get errors when I feed it bad XML. But i want to implement it in a more elegant way. This looks like it would break for large XML etc. Is there some way to validate without the handler so that I get the document validated in one go and then deal with errors? To me it looks Async such that the call to Validate() would pass and some non deterministic time later the handler would get called with the result/errors. Is that right? Thanks and sorry for any goofy mistakes :).

    Read the article

  • Http web request doesn't maintaining session.

    - by Pankaj Mishra
    Hello, I have program where i want to scrap some Useful study material for me. This site site maintaining session key and some other key also. If I trying to go nested page then it will throw me out and showing session out message. I unable to maintaining session key in web request class. so please give me some idea that how can i maintain session in web request class.

    Read the article

  • Get source of some http url with javascript

    - by neon
    Please, I have another simple question for experienced programmers. Is it possible to get source code of any webpage with javascript at client side? With AJAX maybe? But I need that the server I am downloading the url from does see the IP of the client.. with AJAX it will show my script server IP, right? Thank you in advance.

    Read the article

  • email tracking image duplicate requests

    - by DEH
    I am embedding tracking images within emails that are being sent from a custom-built opt-in CRM system. The image src is an encoded .gif, such as src="12_34_675.gif". The image is served by an ASP.NET httphandler that decodes the src encoding and serves a transparent image. Everything works fine, but some email clients request the image multiple times, creating duplicate entries. Some clients make three calls all within one second, and some seem to make tens of calls over a day or so. Mostly email clients make single calls, but these few duplicates are very perplexing. I know I can code around them, but I'd really like to understand what's going on. I've checked the IIS log files, which show that the duplicate requests are coming from the client machines. I can't think what might be causing these duplicate http requests. Help!

    Read the article

  • Is it possible to set ContentType for a WCF WebGet method?

    - by James Cadd
    I'm working with a WCF restful/http method that returns a stream of image data. I want to make sure that the content type is marked as "image/png". The method is defined as: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class TileImageService { [WebGet(UriTemplate = "{id}")] public Stream GetTileImage(string id) { Bitmap bmp = new Bitmap(173, 173); Graphics g = Graphics.FromImage(bmp); g.Clear(Color.Blue); g.DrawString(DateTime.Now.ToLongTimeString(), new Font("Chiller", 20), Brushes.White, new PointF(10, 10)); g.Flush(); MemoryStream ms = new MemoryStream(); bmp.Save(ms, ImageFormat.Png); ms.Seek(0, SeekOrigin.Begin); return ms; } } In Firefox it looks like the content type is marked as application/octet stream. Is there a way to change the content type?

    Read the article

  • What is wrong with my Basic Authentication in FireFox?

    - by Pure.Krome
    Hi folks, i'm trying to goto the following url :- http://user1:pass1@localhost:1234/api/users?format=xml nothing to complex. Notice how i've got the username/password in the url? this, i believe, is for basic authentication. When i do that, the Request Headers are MISSING the 'Authorize' header. Er... that's not right :( I have anonymous authentication only setup on the site. I don't want to have anon off and basic turned on .. because not all of the site requires basic.. only a few action methods. So .. why is this not working? Is this something to do with the fact my code is not sending a 401 challenge or some crap? For What It's Worth, my site is ASP.NET MVC1 running on IIS7 (and the same thing happens when i run it on cassini).

    Read the article

  • Android HTTP Connection

    - by Ubersoldat
    Can anybody tell my why this doesn't work in the Android emulator? From the browser I have access and the server is internal. All I can think of is that I'm missing some configuration on my app so it can access the network layer. try { InetAddress server = Inet4Address.getByName("thehost"); //Doesn't work either //or InetAddress server2 = Inet4Address.getByAddress(new String("192.168.1.30").getBytes()); if(server.isReachable(5000)){ Log.d(TAG, "Ping!"); } Socket clientsocket = new Socket(server, 8080); } catch (UnknownHostException e) { Log.e(TAG, "Server Not Found"); } catch (IOException e) { Log.e(TAG, "Couldn't open socket"); } Throws an UnknownHostException Thanks

    Read the article

  • Proxy HTTPS requests to a HTTP backend with NGINX.

    - by Mike
    I have nginx configured to be my externally visible webserver which talks to a backend over HTTP. The scenario I want to achieve is: Client makes HTTPS request to nginx nginx proxies request over HTTP to the backend nginx receives response from backend over HTTP. nginx passes this back to the client over HTTPS My current config (where backend is configured correctly) is: server { listen 80; server_name localhost; location ~ .* { proxy_pass http://backend; proxy_redirect http://backend https://$host; proxy_set_header Host $host; } } My problem is the response to the client (step 4) is sent over HTTP not HTTPS. Any ideas?

    Read the article

  • 302 Redirect to Images in IE8 do not render image

    - by empire29
    I am helping migrate a legacy application. One of the requirements is we are able to handle requests for old images. What we have is: New site on new.com Old site on old.com Images to links (imported content) point to /imgs/cat.png however the actual image is hosted on old.com/assets/images/cat.png (for now). <img src="/imgs/cat.png"/> I setup a redirect for all png, jpg, jpeg, gif that 302's requests for new.com/imgs/(.*).(png|jpg|jpeg|gif) to http://old.com/assets/images/$1.$2 Everything works find in Chrome, Firefox and IE9 - however it was noted in IE8 the image does not render. Its possible that it has the same issue in IE7, 6 and 5.5 however I have not been able to test this. Does anyone know why this is happening and how to fix? I tried setting the contentType header on the response of the 302's to image/(png|jpg|jpeg|gif) and this did not have any impact. Any insight would be appreciated.

    Read the article

  • runModalForWindow throttles http requests

    - by Nikita Rybak
    I have url connection, which normally works fine NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:delegate]; But when I create a modal window, no request ever receives response: [NSApp runModalForWindow:window]; If I comment this line out, thus creating a 'standard' window, everything works. I tried implementing all methods from NSURLConnectionDelegate, not a single of them called. I suspect this is something about 'run loops', but have little experience in this area. Does anybody have experience in this? Thank you

    Read the article

  • Forcing the browser to pop a save as dialog box from a link pointing to remote url

    - by user360788
    Hi, I am building a web app that lets the user directly download files on a cdn by clicking a link. The link should point to the cdn url directly in order to minimize the load on our servers. We would like the to have the browser pop up the save as dialog box when the user clicks the link to download the file and not have the browser display the content of the file at all. So the page should not reload. However, we don't have access to setting the HTTP headers sent back from cdn. Is it possible to still pop up the save as dialog box for download using client-side code?

    Read the article

  • I want to design a html form in python

    - by VaIbHaV-JaIn
    when user will enter details in the text box on the html from <h1>Please enter new password</h1> <form method="POST" enctype="application/json action="uid"> Password<input name="passwd"type="password" /><br> Retype Password<input name="repasswd" type="password" /><br> <input type="Submit" /> </form> </body> i want to post the data in json format through http post request and also i want to set content-type = application/json

    Read the article

  • http transfer file from server to server

    - by qualle
    Hi, with html forms we can upload a file from a client to a server with enctype="multipart/form-data", input type="file" and so on. Is there a way to have a file already ON the server and transfer it to another server the same way? Thanks for hints.

    Read the article

  • How to process <input type="file" name="test1[f]" /> in PHP?

    - by user198729
    var_dump($_FILES) gives the following: array 'test1' => array 'name' => array 'f' => string 'ntuser.dat.LOG' (length=14) 'type' => array 'f' => string 'application/octet-stream' (length=24) 'tmp_name' => array 'f' => string 'D:\wamp\tmp\php223.tmp' (length=22) 'error' => array 'f' => int 0 'size' => array 'f' => int 0 Why is http designed this way?How can I get the file by $_FILES['test1']['f']?

    Read the article

  • Get string value from http response with Mechanize

    - by Gearóid
    Hi, I'm currently integrating facebook into my current app and I've succeeded in retrieving the access_token using the following code: url="#{url}?#{client_id}&#{client_secret}&#{code}&#{redirect_uri}&type=client_cred" agent = Mechanize.new page = agent.get(url) The page object above has a body which contains text something along the lines of access_token=XXXXX I just want to pull out the access_token value. I can get the entire string simply by writing: page.body But I was wondering is there a way to get the access_token value without resorting to regular expressions etc? Thanks.

    Read the article

  • Sending url params and POST body to a MVC 2 Controller

    - by Luiggi
    Hi, I'm having some issues trying to make a HTTP PUT (or POST) using WebClient against a MVC 2 controller. The exception is: The parameters dictionary contains a null entry for parameter 'total' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Company(System.Guid, Int32, Int32, System.String)' The controller action is: [HttpPut] public ActionResult Company(Guid uid, int id, int total, string url) The route is: routes.MapRoute( "CompanySet", "job/active/{uid}/company/{id}", new { controller = "Job", action = "Company" } ); As you may see, what I want is to send the 'uid' and 'id' parameters via url, but the 'total' and 'url' parameters as part of the PUT or POST body. I've also tried to merge the latter parameters into a class (i.e., CompanySetMessage), doing it no longer raises an exception but I dont receive the values on the server side. Any ideas? Thank you!

    Read the article

  • HTTP POSTed files automatically uploaded to root directory

    - by Baddie
    I just inherited an ASP.NET WebForms web application that I was tasked with refactoring. One of the features is a file upload and while debugging I noticed that as soon as a file is posted to a certain page/handler, it is automatically uploaded to the root directory of the application. The file is then moved to the proper location. I can't seem to figure out whats causing this automatic upload of the file. Is there something I'am overlooking in ASP.NET WebForms that allows this to happen? Is it an IIS configuration or something?

    Read the article

  • How not to abort http response c#

    - by user194076
    I need to run several methods after sending file to a user for a download. What happens is that after I send a file to a user, response is aborted and I can no longer do anything after response.end(). for example, this is my sample code: Response.Clear(); Response.AddHeader("content-disposition", "attachment; filename=test.pdf"); Response.ContentType = "application/pdf"; byte[] a = System.Text.Encoding.UTF8.GetBytes("test"); Response.BinaryWrite(a); Response.End(); StartNextMethod(); Response.Redirect(URL); So, in this example StartNextMethod and Response.Redirect are not executing. What I tried is I created a separate handler(ashx) with the following code: public void ProcessRequest(HttpContext context) { context.Response.Clear(); context.Response.AddHeader("content-disposition", "attachment; filename=test.pdf"); context.Response.ContentType = "application/pdf"; byte[] a = System.Text.Encoding.UTF8.GetBytes("test"); context.Response.BinaryWrite(a); context.Response.End(); } and call it like this: Download d = new Download(); d.ProcessRequest(HttpContext.Current); StartNextMethod(); Response.Redirect(URL); but the same error happen. I've tryied to replace Response.End with CompleteRequest but it doesn't help. I guess the problem is that I'm using HttpContext.Current but should use a separate response stream. Is that correct? how do I do that in a separate method generically (Assume that I want my handler to accept byte array of data and content type and be downloadable from a separate response. I really do not want to use a separate page for a response. UPDATE I still didn't find a good solution. I'd like to do some actions after user has downloaded a file, but without using a separate page for a response\request thing.

    Read the article

  • Poco C++ library on OSX 10.8.2: Undefined symbols for architecture x86_64

    - by Arman
    I'm trying to use Poco C++ library to do the simple http requests in C++ on Mac OS X 10.8.2. I installed Poco, copy-pasted the http_request.cc code from this tutorial, ran it with 'g++ -o http_get http_get.cc -lPocoNet', but got: Undefined symbols for architecture x86_64: "Poco::StreamCopier::copyStream(std::basic_istream<char, std::char_traits<char> >&, std::basic_ostream<char, std::char_traits<char> >&, unsigned long)", referenced from: _main in ccKuZb1g.o "Poco::URI::URI(char const*)", referenced from: _main in ccKuZb1g.o "Poco::URI::~URI()", referenced from: _main in ccKuZb1g.o "Poco::URI::getPathAndQuery() const", referenced from: _main in ccKuZb1g.o "Poco::URI::getPort() const", referenced from: _main in ccKuZb1g.o "Poco::Exception::displayText() const", referenced from: _main in ccKuZb1g.o "typeinfo for Poco::Exception", referenced from: GCC_except_table1 in ccKuZb1g.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status Have been struggling with this for couple of hours. Any idea how to fix this? Thanks in advance!

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >