473,395 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Winform cannot connect to webservice via CAS policy

Dan

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(Bool ean 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.SoapHttpClientProtoc ol.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


Feb 26 '07 #1
1 2897
Dan
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" <da*@somewhere.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
>
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(Bool ean 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.SoapHttpClientProtoc ol.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


Feb 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cgia | last post by:
I found out that only using winform I can use the winword interop and generate word document in the client machine and connect to a remote database, so that I have made a winform application which...
0
by: Cenray | last post by:
How to generate a web request from a Winform Application using a WebService? In a C# Windows Application, when I try to genrate a web request using the following code, it is woking fine ...
0
by: Sharon McCarty | last post by:
Hi Everyone, I'm creating a webservice that's written in C++. So, I'm using the wizard by creating a c++ project using the template, ASP.net Web Service. I am trying to make method calls...
2
by: hazz | last post by:
I don't get it. I have a VS2005 solution with a web service project and a windows project. The web service when tested on its own works fine. But when I add it as a web reference and refer to it my...
0
by: Rene Ruppert | last post by:
Hi, On the web I found a simple sample/tutorial for a webservice, some kind of chat software. I implemented the server and the client. When I run the client form on the host PC everything works...
0
by: Standist | last post by:
vs.net 2003 I create a webservice using vc.net.In the webservice invoked a method in a dll from third party. I compile and link the program without any error.But I got a error when I debug it,I...
0
by: Dan | last post by:
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...
10
by: IsRaEl | last post by:
Hello everybody... i reeeealy need a way to automatically execute a WinForm with the same permissions that i have with the LocalService user. Thanks in advance...
0
by: icemx | last post by:
Hi, I'm trying to find a way to get and modify the stream sent by my winform application to a Java webservice. It was supose to be easy .... but.. Here are the problems.. 1- My first intend...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.