Hi, I hope someone could help me.
I have a simple web service that I developed on my laptop that resides
within a large web application. It queries Northwind & presents the data in a
grid in the asp.net client page that called it. I moved the whole app to a
test server, & when I try to run it, I get the error "No connection could be
made because the target machine actively refused it". It looks like the wsdl
still points to my laptop where the service was made. How do I change that to
the server? Can I manually type the path in the wsdl, or do I need to somehow
recreate it on the test server? Do I need to do anything else, like in
web.config? Or I've been reading that a dll has to be in bin....how do I get
a dll for the service if it's in a larger app?
It appears that the issue is in the auto-generated files that reside in
"C:\WINDOWS\Microsoft.NET/Framework\v2.0.50727\Temporary ASP.NET
Files\root\fdd4322\74322047\App_WebReferences\...
Here's the error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
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.Sockets.SocketException: No connection could
be made because the target machine actively refused it
Source Error:
Line 45:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://www.1ocmcad.net/GetCustomers",
RequestNamespace="http://www.1ocmcad.net",
ResponseNamespace="http://www.1ocmcad.net",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
Line 46: public System.Data.DataSet GetCustomers() {
Line 47: object[] results = this.Invoke("GetCustomers", new
object[0]);
Line 48: return ((System.Data.DataSet)(results[0]));
Line 49: }
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\root\fdd4322a\74322047\App_WebReferences.8xk aqtin.0.cs Line: 47
Stack Trace:
[SocketException (0x274d): No connection could be made because the target
machine actively refused it]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) +1002146
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431
[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetRequestStream() +1504525
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters) +103
NorthwindCustomers.CustomerService.GetCustomers() in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\root\fdd4322a\74322047\App_WebReferences.8xk aqtin.0.cs:47
WebServicesRemoting_ConsumeService.btnGetCustomers _Click(Object sender,
EventArgs e) in e:\1ocmcad\WebServicesRemoting\ConsumeService.aspx .cs:22
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
Although I was warned not to change anything in these files, I noticed they
pointed to my development laptop, so I altered the path to that of the
server, but that didn't accomplish anything because there's also a .dll there
that I'm sure has the original path to my dev machine.
Obviously, I do not know how to re-do the web reference on the test server.
I'm hoping someone out there can help....and thanks in advance!
Orbit