I want to create an signalr app that will be self hosted using Owin, so to start off i tried to run the sample that is on https://github.com/SignalR/SignalR/wiki/Self-host. But when i run the application and then navigate to /signar/hubs i get a 500 Server error. I get the same exception when i try to connect from my client app.
Do i need to add something else apart from what is in the sample code? or does anyone know of a good tutorial?
Things to check if trying to access from an external connection:
Are you hosting the server on all addresses or just localhost?
// use http://*:8080 to bind to all addresses.
string url = "http://localhost:8080";
Make sure to run app as administrator.
Also, is the Windows firewall blocking the port you are using? I had to add an exception to allow incoming TCP connections on that port.
Related
I have a Virtual Machine which is deployed on a Windows server. I have a custom port let's say 1100 on which some web APIs are called. Those APIs are accessed internally and externally as well. But there are some GET commands which are giving ERR CONNECTION RESET on the same port when accessed externally. i.e. the same commands are working internally on the VM and as well as on the server but when we try to access it from outside the network it gives an error. Other Calls/APIs are working very well on the same port 1100.
What steps do to make it executable?
Note I am using the Mikrotik Firewall behind the server
Any help would be highly appreciated.
I have a project which is made of a console application which listens to a port and acts when a message is received.
The messages are received from an asp.net web api based web site.
Both work properly together.
I wanted to combine both solutions into one executable file.
To accomplish that I used OWIN self hosted solution.
I managed to merge the web site into the console application and when working from my local machine I manage to see the web site and everything works well.
The problem occurs when I try to open the website from another machine\device connected to my LAN.
I get no response. I know it is not a firewall issue since my OWIN self hosted using the standalone website's port (I put the website down to make the port available).
This problem didn't occur when both solution where seperate.
I assume it is an owin configuration issue.
I tried to use the following code but I get access denied exception.
options.Urls.Add($"http://{Dns.GetHostName()}:{port}");
options.Urls.Add($"http://localhost:{port}");
If I use only
options.Urls.Add($"http://localhost:{port}");
There is no exception and it works from my computer as expected but not from another machine.
I did some search but didn't manage to make it work.
Any kind of assistance will be appreciated.
Thanks in advance!
you can either use specific ip-address or use * to listen on a port
I use below code for specific ip-address
var ip = Dns.GetHostEntry(Dns.GetHostName());
var ipaddress = ip.AddressList.FirstOrDefault(x => x.AddressFamily == AddressFamily.InterNetwork);
options.Urls.Add($"http://{ipaddress}:{port}");
or you can also do
options.Urls.Add($"http://*:{port}");
Open the ports on the firewall and
instead to use it
WebApp.Start("http://localhost:8080/");
Use it:
WebApp.Start("http://*:8080/");
My q is whats can stop http post from desktop applications ?
e.g
i have a desktop application before it start it's ask users form some information
like a username ad Email ,,, and then take this information and post it on php webpage and php insert it into MySql Server any way the problem now is lets say like
6 of 16 download(s) are registered and the others not so whats can make http post not run correctly ?
Note :
Software tested on every windows os and runs ok
Software run with all anti viruses programs ok
Software add port throw windows firewall ok
So whats can make http post not run correctly ?
Regards
There are many things that could stop communication between your application, and your database.
If the client has a firewall that requires authorisation for outbound requests.
If the client has to connect via a proxy server, and you application is not proxy aware
If your website fails to process your request (perhaps, if the MySql server is too busy to allow connections, etc.)
So, consider an end user behind a WebSense proxy that additionally allows administrators to filter out unwanted traffic. If your application is not proxy server aware, it will fail to connect; If your application is proxy aware, and whatever WebSense category you fall into is filtered for that client, it will also fail to connect.
My webapplication hosted on windows azure, needs to communicate with TFS Server. When any one login to my web app using live id, I want the logged in user to use my Team foundation server(TFS) credentials -username,password and domain to programatically authenticate and connect to our TFS server and create some work items.
I configured my azure connect for the communication to happen between azure WebRole and TFS server (our TFS is non-azure ).I added both the WebRole and the TFS Server into single Connection Group
In my azureportal ,I can see mywebrole and my TFSServer as connected the machine endpoint is active, and that it refreshes since the last connected updates
.But when I try to run my web application from azure and when it tries to communicate with our TFS server ,its throwing error message saying Error message : Team Foundation services are not available from server eg.,http://xyz-abcxyx-01:8080/tfs/eas/. Technical information (for administrator): The remote name could not be resolved: 'xyz-abcxyx-01'
Any suggestions to resolve this issue ?
You should enable remote desktop on your WebRole and connect to one of your instances. Then, try to ping the IP of your TFS server (not the hostname xyz-abcxyx-01). Maybe this is simply a DNS issue (even though using hostnames works with Windows Azure Connect).
If pinging the IP works, but pinging the hostname doesn't work you have a few options left:
Use the IP instead of the hostname. This won't work if you configured your TFS to use host headers.
Create an elevated startup task to modify the hosts file and map the IP to the hostname. In your code you can keep working with the hostname.
Try to modify the DNS server configured in your WebRole to use the default DNS server + your internal DNS server. But to me this doesn't look like a clean solution.
Anyways, in each solution you'll want to store the IP/hostname in the ServiceConfiguration and make sure your code supports changes to the ServiceConfiguration. This will allow you to change the IP/hostname without having to redeploy.
You should check if TFS server is listening on all network interfaces, include the one created by Azure Connect (start with 2a01). Next try to connect to TFS from a machine on the local LAN, just to make sure it is configured correctly. You don't need to use IP for referring to TFS, DNS name is definitely supported out of box.
Good afternoon in my timezone.
I am developing a web appp in J2EE.
This web app is called and access inside a sharepoint portal.
When i enter through the sharepoint portal i can access my application, using chrome developes tools i can see all the HTTP traffic, and i see that the browsers sends a request to the following server that is where my app is running serverprd.enterprisename.com.
But when i use the command line in my windows 7 , to ping the machine(server) , for example :
ping serverprd.enterprisename.com it returns me the following message:
"Ping request could not find host serverprd.enterprisename.com"
I am using a proxy.
Can anyone tells me why this happening ? Why through the browser i can access the server and the ping command does not find me the server ?
With the best regards.
Thanks in advance.
Your proxy server id the one who have an access to outside world. All http requests are sent to proxy server and proxy server does DNS lookup. In case of pin, your host have to do DNS lookup and this operation obviously now allowed ( firewall or so).