Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to communicate via web socket in c# (kind of handshaking or so). Currently I hosted a wcf service . But on communicating i am getting the exception as below.

Access denied.

http://test-417vm2/CBWSI_Stub/ is the wcf service hosted with default document service1.svc and it is showing fine.

What I have tried:

client code
WebsocketServer websocketServer = new WebsocketServer();
           websocketServer.Start("http://test-417vm2/CBWSI_Stub/");
           Console.WriteLine("Press any key to exit...");
           Console.ReadKey();


server code
HttpListener httpListener = new HttpListener();
httpListener.Prefixes.Add(httpListenerPrefix);
httpListener.Start();
Console.WriteLine("Listening...");
Posted
Comments
F-ES Sitecore 26-Jun-18 10:39am    
What happens if you add service1.svc to the url path?
ranio 26-Jun-18 11:10am    
The solution is run in the same instance. It is set with Server call first and Client Call second in the application start up properties.

I get the exception as below:
Only Uri prefixes ending in '/' are allowed.
Parameter name: uriPrefix'
[no name] 26-Jun-18 12:42pm    
Try https instead of http?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900