Winform cannot connect to webservice via CAS policy

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hi

I have a dotnet application that communicates with a web service running
locally on my machine. It connects fine and works ok when I run the
application from the c: drive. Am having problems running it from my ftp
location, so

ftp://localhost/setup.exe

In the Runtime security policy I have created a new code group under my
machine entry, and made the membership conditions to use Strong name, and
assigned the public key from setup.exe to it. The permission set is set to
FullTrust.
The application now launces, but when accessing the web service I get the
following exception thrown:

************** Exception Text **************
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: No connection could be made because the
target machine actively refused it
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)


I've tried setting all the permission manually, but nothing work. and I've
tried the evaluate assembly util which tells me I've got things setup
correctly.

But the application works fine when not via the ftp!!! so I now the web
service is working ok.


The FTP on ISS is set to use annouymous access

Am using vs2005 on windows xp pro.

thanks for any help
dan




.



Relevant Pages

  • RE: System.Net.WebException
    ... timeout that is occuring on the web service? ... A connection attempt failed because the ... Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Socket buffer management
    ... to serialize your socket sends/receives. ... and this service can utilize one connection to the backend. ... > I have a web service that connects via sockets to another server. ... > 515 byte buffer and sent via sockets to the other server. ...
    (microsoft.public.dotnet.framework.webservices)
  • Winform cannot connect to webservice via CAS policy
    ... I have a dotnet application that communicates with a web service running ... but when accessing the web service I get the ... No connection could be made because the ... Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState ...
    (microsoft.public.dotnet.framework.webservices)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)