473,657 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No connection could be made because the target machine actively refused it

I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "

Jul 24 '06 #1
8 30801
Since it works locally, we can almost rule out a problem with IIS. But can
you please verify that IIS binds to the IP address that you are trying to
connect to from a remote machine?

Is it possible that you have a firewall enabled (Windows XP's or a
third-party firewall) that could be blocking remote requests on port 80
(assuming that is the port you use)?
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
hu*******@yahoo .com wrote:
>I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticatio n mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Securit y.Principal.Win dowsIdentity.Ge tCurrent().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "
Jul 24 '06 #2
local accounts generally do not have network access. you should use a domain
account.
-- bruce (sqlwork.com)

<hu*******@yaho o.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
>I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "

Jul 24 '06 #3
Thanks for the reply. Actually, I cannot connect even on my local
machine. If I go to the test site of the webservice it works
(http://localhost/Service.asmx) but http://localhost/MyWebservice.aspx
which uses the webservice does not.

Thanks

Kristofer Gafvert wrote:
Since it works locally, we can almost rule out a problem with IIS. But can
you please verify that IIS binds to the IP address that you are trying to
connect to from a remote machine?

Is it possible that you have a firewall enabled (Windows XP's or a
third-party firewall) that could be blocking remote requests on port 80
(assuming that is the port you use)?
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
hu*******@yahoo .com wrote:
I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "
Jul 24 '06 #4
What is your IIS configuration look like? Is Anonymous access disabled? IE
is probably doing the NTLM authentication automatically. The website won't
do that. Try disabling integrated authentication on IIS itself and enable
only Anonymous access. I'd bet that fixes the problem. Hope this helps.

Sincerely,
John Swanagon
Sr. Software Engineer, Avaya Labs
Avaya Inc.
jm********@avay a.com

<hu*******@yaho o.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
>I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "

Jul 24 '06 #5
My IIS configuration is "Integrated Windows authentication" and "Enable

anonymous access" is disabled. The reason I am using impersonation is
because I need the additional access rights.

Swanagon, John M (John) wrote:
What is your IIS configuration look like? Is Anonymous access disabled? IE
is probably doing the NTLM authentication automatically. The website won't
do that. Try disabling integrated authentication on IIS itself and enable
only Anonymous access. I'd bet that fixes the problem. Hope this helps.

Sincerely,
John Swanagon
Sr. Software Engineer, Avaya Labs
Avaya Inc.
jm********@avay a.com

<hu*******@yaho o.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "
Jul 24 '06 #6
Ah, got it. Then, in that case, all you need to do is authenticate to the
webserver before your site will be able to access the web service. I
believe it would involve providing the correct headers telling the server to
use NTLM authentication. Since your website is using impersonation, the
context for NTLM should exist in order for it to work properly. I don't
know the code right off-hand, but if you want, I could write something up
and post it here. Just let me know...

Thanks,
John

<hu*******@yaho o.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
My IIS configuration is "Integrated Windows authentication" and "Enable

anonymous access" is disabled. The reason I am using impersonation is
because I need the additional access rights.

Swanagon, John M (John) wrote:
>What is your IIS configuration look like? Is Anonymous access disabled?
IE
is probably doing the NTLM authentication automatically. The website
won't
do that. Try disabling integrated authentication on IIS itself and
enable
only Anonymous access. I'd bet that fixes the problem. Hope this helps.

Sincerely,
John Swanagon
Sr. Software Engineer, Avaya Labs
Avaya Inc.
jm********@avay a.com

<hu*******@yah oo.comwrote in message
news:11******* *************** @m79g2000cwm.go oglegroups.com. ..
>I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "

Jul 24 '06 #7
If you could show me some code that leads me in the right direction
that would be very much appreciated. I'm a novice with this stuff and
really didn't get a good grip on authentication yet.

Thanks

Swanagon, John M (John) wrote:
Ah, got it. Then, in that case, all you need to do is authenticate to the
webserver before your site will be able to access the web service. I
believe it would involve providing the correct headers telling the server to
use NTLM authentication. Since your website is using impersonation, the
context for NTLM should exist in order for it to work properly. I don't
know the code right off-hand, but if you want, I could write something up
and post it here. Just let me know...

Thanks,
John

<hu*******@yaho o.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
My IIS configuration is "Integrated Windows authentication" and "Enable

anonymous access" is disabled. The reason I am using impersonation is
because I need the additional access rights.

Swanagon, John M (John) wrote:
What is your IIS configuration look like? Is Anonymous access disabled?
IE
is probably doing the NTLM authentication automatically. The website
won't
do that. Try disabling integrated authentication on IIS itself and
enable
only Anonymous access. I'd bet that fixes the problem. Hope this helps.

Sincerely,
John Swanagon
Sr. Software Engineer, Avaya Labs
Avaya Inc.
jm********@avay a.com

<hu*******@yaho o.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any problem
when I go to the test page http://localhost/Service.asmx. When I try to
consume that webservice from the website I get the error shown bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice", new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "
Jul 25 '06 #8
Sure, will do. I will post here in a little bit.

John

<hu*******@yaho o.comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
If you could show me some code that leads me in the right direction
that would be very much appreciated. I'm a novice with this stuff and
really didn't get a good grip on authentication yet.

Thanks

Swanagon, John M (John) wrote:
>Ah, got it. Then, in that case, all you need to do is authenticate to
the
webserver before your site will be able to access the web service. I
believe it would involve providing the correct headers telling the server
to
use NTLM authentication. Since your website is using impersonation, the
context for NTLM should exist in order for it to work properly. I don't
know the code right off-hand, but if you want, I could write something up
and post it here. Just let me know...

Thanks,
John

<hu*******@yah oo.comwrote in message
news:11******* *************** @m73g2000cwd.go oglegroups.com. ..
My IIS configuration is "Integrated Windows authentication" and "Enable

anonymous access" is disabled. The reason I am using impersonation is
because I need the additional access rights.

Swanagon, John M (John) wrote:
What is your IIS configuration look like? Is Anonymous access
disabled?
IE
is probably doing the NTLM authentication automatically. The website
won't
do that. Try disabling integrated authentication on IIS itself and
enable
only Anonymous access. I'd bet that fixes the problem. Hope this
helps.

Sincerely,
John Swanagon
Sr. Software Engineer, Avaya Labs
Avaya Inc.
jm********@avay a.com

<hu*******@yah oo.comwrote in message
news:11******* *************** @m79g2000cwm.go oglegroups.com. ..
I have a website that consumes a webservice. Both of them are in the
Default Website folder. I can execute the service without any
problem
when I go to the test page http://localhost/Service.asmx. When I try
to
consume that webservice from the website I get the error shown
bellow.
In my web.config I have:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="auser " password="apwd"/>

IIS is configured as "Integrated Windows authentication" and "Enable
anonymous access" is disabled.

System.Security .Principal.Wind owsIdentity.Get Current().Name returns
"auser".

I am struggling with that for a LONG time so any help is greatly
appreciated.

Thanks

Error:

"No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.Sock ets.SocketExcep tion: No connection
could be made because the target machine actively refused it

Line 110: object[] results = this.Invoke("My Webservice",
new
object[] {

Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\2667 6eb7\92c7e946\A pp_WebReference s.rglqbs34.0.cs
Line: 110 "


Jul 25 '06 #9

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

Similar topics

0
4796
by: Data | last post by:
In my project I want to execute some commands on the remote machine. I am using .Net Remoting to achieve this. My server which is an exe is copied on the remote machine and it receives command from client which is executed by the exe. I am facing problem while executing the exe on the remote machine. If I start the exe manually everything works fine but if I execute it remotely through code using WMI an exception is thrown saying "No...
5
6290
by: Data | last post by:
In my project I want to execute some commands on the remote machine. I am using .Net Remoting to achieve this. My server which is an exe is copied on the remote machine and it receives command from client which is executed by the exe. I am facing problem while executing the exe on the remote machine. If I start the exe manually everything works fine but if I execute it remotely through code using WMI an exception is thrown saying "No...
0
2237
by: gaurav tyagi | last post by:
i am trying to downlosd frles from a local ftp server in my network . here i am able to connect to server but to get file list from server i send "PASV" command it retuns some value which is not 227. agian i pass "PASV" command then it returns correct value which is 227. now i have ip of server and port number so i try to create socket for connection but this time it send me a exception "No connection could be made because the target...
5
7694
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini webserver in VS2005 then everything is rosy. If I then set up the website on the local IIS 5.1 the site no longer connects and returns this error: An error has occurred while establishing a connection to the server. When connecting to SQL Server...
1
12535
by: Vikram S | last post by:
Hi All, I have an ASP.NET 2.0 web application on a web server and a separate machine for SQL Server 2000 Database. I am using a Connectionstring based on Sql Authentication to connect to the the SQL 2000 Database. Now, When I open the web page on the Web Server itself, I am able to successfully connect to the Database which confirms that the connection string is correct. However when I open the same web page from another client
0
3213
by: Homer | last post by:
Hi, I got "InnerException: Unable to connect to remote server"..."No connection could be made because the target machine actively refused it" when I attempted to send an email through my Intranet app that is written in asp.net 2.0. The smtp server is a local server and it uses Port 25. The Authentication is set to Anonymous Access. Here's my code: <system.net>
0
1340
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
I have a TCPListener in a Service. Works fine. But if I stop it and manually restart it, I get No connection could be made because the target machine actively refused it. in my app with the TCPClient. If I reboot the computer, everything is fine again. I guess something is left hanging even when the service app is shut down. What do I need in the
2
8300
by: thupham | last post by:
On the Client Side, I programmed on Socket, when try to make connect Server and Client on the internet (WAN). I met 2 exception 1) No connection could be made because the target machine actively refused it 2)A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. public void Connect(string Host,int port){ try { ...
3
3742
by: Adhal | last post by:
Hi, I am using remoting to pass in parameters from new launches of an application. So basically I have only one instance of the application and I am using remoting to pass the parameters. The problem is as follows: I can remote call the first few times, but then I get the "No connection could be made because target machine actively refused it 127.0.0.1:8084"
0
8399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.