I'm trying to get a very basic echo WebSocket-server running self-hosted with Owin. But how do I do that? When specifying the url i WebApp.Start as for instance "ws://localhost:1337" I get a message saying "ws" is not supported, only "http(s)". Is it not possible to use Owin.Hosting to host WebSocket on ws(s)?
I'm also using Owin.WebSocket to integrate WebSockets into Owin.
specify http:// on the server. You only need to use ws:// on the client.
Related
Have created a chatbot and I am trying to connect it to my local host using ngrok....the localjost is running via my computer and is showing active...however dialogflow webhook is not able to send any request to the ngrok portal...
I have tried multiple time to host a server via ngrok and pasted the link in webhook section in Dialogflow..but dialogflow diagnostic shows
Webhook call failed. Error: PERMISSION_DENIED.
fulfillment status ngrok cmd prompt ngrok server
Any help would be appreciated...not sure what I am missing....
Without seeing the actual configuration, there are a few things I would look at:
Make sure you're actually using the right ngrok URL from your console. Many times I was using an older URL in the Dialogflow configuration.
Make sure you're using the HTTPS URL.
Make sure your server is actually running on your computer, and that it is listening at the same port that ngrok is using on your computer.
Check the ngrok console to see if it is getting the request at all and what the response might be.
Go to http://localhost:4040/ which will give you details of each connection through ngrok.
After installing WSO2EI-6.1.1 to migrate from my old WSO2DSS to EI, I was trying to setup a simple php wsdl soup client to call the "Version" service from php with a direct link to service wsdl and I'm getting the following error:
php code:
try {
$client = new SoapClient("http://server-ip:8280/services/Version?wsdl");
$response = $client->getVersion();
var_dump($response);
} catch (SoapFault $fault) {
echo $fault->getMessage();
}
error:
Fatal error: Maximum execution time of 120 seconds exceeded
Seems like the connection is timing out... I have tried to get the service wsdl with file_get_contents with the same result, timing out. well sometimes it works with a terrible loading time of like 90-100 seconds, but most of the times it times out.
$wsdl = file_get_contents("http://server-ip:8280/services/Version?wsdl");
var_dump($wsdl);
I have tested the link in browser and it is loading fine. Also tested with curl from linux command line and it loads fine there as well so the link is accessible.
curl -v http://server-ip:8280/services/Version?wsdl
So the timeout happens only when I try to retrieve the wsdl from within php. however if I download and save the wsdl file and pass the local xml file in php instead, then the service works fine and the version is fetched and displayed.
try {
$client = new SoapClient("Version.xml");
$response = $client->getVersion();
var_dump($response);
} catch (SoapFault $fault) {
echo $fault->getMessage();
}
So it seems like the problem is only fetching the wsdl directly from server in php and the rest of the communication between the server and the client is working fine.
after few hours searching I decided to try nhttp transport in transportReceiver configuration of axis2 instead of pass through transport and the problem is solved. however, reading the docs it is noted that the default transport is pass through and it is better in terms of performance compared to nhttp.
so is it a bug or something there causing the problem or am I doing something wrong and its possible to retrieve the wsdl directly from server within php while using the pass through transport?
Update:
when I use port numbers 9763 for http or 9443 for https instead of 8280 and 8243 to access services or service wsdl then I can access services or wsdl from php with no problems. So can anyone please explain to me whats the difference when using the port number 9763 or 8280 to access a service over http transport? Is it ok to use 9763 instead of 8280 to deal with services or to use 9443 instead of 8243? Is it still using the passthru transport when I use ports 9763 and 9443?
All WSO2 servers have two types of transports — servlet and passthrough (or nhttp). These are used for different purposes. Servlet transports are exposed over port 9443 and 9763 by default. This is the port used by admin services and the management console. The version service also uses the same port. For the services that you write and deploy, they are exposed over 8280 and 8243 ports. To answer your question, for this service you have to use 9763 or 9443 ports. And you will be accessing the Version service over servlet transport and not passthrough transport.
We are trying use socks proxy for tunneling the requests through putty. It used to work in browser version of postman, as we it used to pickup chrome's proxy settings.
The standalone version of postman does not support socks proxy, it just accepts a proxy host and port and no parameters for the socks settings. Is there any way to use socks proxy with standlone postman?
Please advice.
The http-proxy-to-socks NodeJS client is suggested in a helpful post in the Github issue tracking Postman app support for SOCKS5 proxy.
If you have Node.js (and NPM) installed, you can install and configure http-proxy-to-socks on your system and then provide the resulting HTTP proxy values in the existing native Postman app HTTP/HTTPS proxy configuration settings.
On macOS, this simple command creates an HTTP proxy forwarding to my SOCKS proxy:
hpts -s 127.0.0.1:7941 -p 7951
In the Postman (v7.1.1 macOS) 'Proxy' section of preferences/settings, enabling the 'Global Proxy Configuration' and entering the '-p' port value from this command (as well as 'localhost') into the 'Proxy Server' inputs was successful for me.
This particular solution requires less alteration of existing settings in Postman than some other posts in that Github issue that suggest alternative workarounds where URLs have to be remapped to a specific localhost port or similar tedious changes.
One other option to use is a tool privoxy.
There is a blog post on how to use it with Postman: https://www.getpagespeed.com/server-setup/beyond-privoxy
In short, set the forwarding for a domain, where 127.0.0.1:8023 is the SOCKS proxy of yours. This can be done by adding the following line to /etc/privoxy/config.
forward-socks5 .domain.tld 127.0.0.1:8023 .
The default port privoxy listens on is 8118.
Finally configure Postman to use 127.0.0.1:8118 as proxy, i.e., using privoxy which forwards the requests to your SOCKS proxy.
I am writing a 'Content Script' based extension for Chrome that works on GMail (HTTPS). It needs to access a web service on our website, which is currently on HTTP only. Other than getting an SSL, is there any alternative to get an AJAX GET/POST call working between these two?
I think you can : https://developer.chrome.com/extensions/xhr
But be aware that without https someone can see and change everything your extension send or receive with your website.
You should implement https as soon as possible to avoid any security issue.
I am using http-client in clojure with proxy. And I want to try http-kit, however I don't find a way to use proxy. I have a list of proxies stored in database, and then randomly pick up a proxy and use it in http client. Look like there is no api/parameter in http-kit to use a proxy.
There's an open issue for proxy support in http-kit, it doesn't support it yet. https://github.com/http-kit/http-kit/issues/75