Re: Winform cannot connect to webservice via CAS policy

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



ah! fixed it!

just incase anybody needs to know. I had the apppointing to the webservice
from localhost - which wouldn't work from running from the ftp location. I
switched it to my machine name and it worked! must be because running via
CAS it's know about or allow localhost connections.

!
"Dan" <dan@xxxxxxxxxxxxx> wrote in message
news:uef5MVZWHHA.1120@xxxxxxxxxxxxxxxxxxxxxxx

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

  • Asynchronous Socket Server data
    ... The socket server knows what type of data it expects due to the interface ... I can have 1 databuffer only for each datatype to handle multiple connections? ... int bytesRead = handler.EndReceive; ... packetIndex, bytesRead); ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Ping =?ISO-8859-1?Q?kr=E1ft=E9=E9_=3F_Advice_needed_?= =?ISO-8859-1?Q?to_trace_w
    ... He has two telephone extensions leading from the master socket and his ... presume that there is a fault in his extension wiring. ... If it's twisted pair ensure that it's not been connected split pair, in other words the blue white with white blue, orange white with white orange, if you get my drift, & the connections you should use are 2&5 ...
    (uk.telecom.broadband)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, although there's not been the usual ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • Re: What is the best way to stop a Socket.BeginAccept call?
    ... If you want a graceful exit, then stop accepting new connections, ... close all worker sockets, close the listener socket. ... public void AddSocketToList ...
    (microsoft.public.dotnet.languages.csharp)