msgl
asked on
Web Service reference problem when switching from Win XP dev. environment to Windows 7
Hi,
I am building an application and I am using web services for getting data from a server. It was working fine when I was developing on my XP machine but had to switch to Windows 7. On the new machine I grabbed the latest version of the code using sourcesafe.
However, when I try to add a service reference in the solution or update an existing one I get the following error:
There was an error downloading 'http://localhost:52490/Service/CustomerService.asmx'.
The request failed with the error message:
--
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'Digital_Server.CustomerSe rvice'.
Source Error
<%@ WebService Language="vb" CodeBehind="CustomerServic e.asmx.vb" Class="Digital_Server.Cust omerServic e" %>
Source File: /Service/CustomerService.a smxLine: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
<!--
[HttpParseException]: Could not create type 'Digital_Server.CustomerSe rvice'.
at System.Web.UI.SimpleWebHan dlerParser .GetType(S tring typeName)
at System.Web.UI.SimpleWebHan dlerParser .GetTypeTo Cache(Asse mbly builtAssembly)
at System.Web.Compilation.Sim pleHandler BuildProvi der.GetGen eratedType (CompilerR esults results)
at System.Web.Compilation.Bui ldProvider .CreateBui ldResult(C ompilerRes ults results)
at System.Web.Compilation.Bui ldProvider .GetBuildR esult(Comp ilerResult s results)
at System.Web.Compilation.Bui ldManager. CompileWeb File(Virtu alPath virtualPath)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultI nternal(Vi rtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultW ithNoAsser t(HttpCont ext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResult( HttpContex t context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResult( HttpContex t context, VirtualPath virtualPath)
at System.Web.UI.WebServicePa rser.GetCo mpiledType (String inputFile, HttpContext context)
at System.Web.Services.Protoc ols.WebSer viceHandle rFactory.G etHandler( HttpContex t context, String verb, String url, String filePath)
at System.Web.Script.Services .ScriptHan dlerFactor y.GetHandl er(HttpCon text context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication .MapHttpHa ndler(Http Context context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication .MapHandle rExecution Step.Syste m.Web.Http Applicatio n.IExecuti onStep.Exe cute()
at System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously)
-->
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:52490/Service/CustomerService.asmx'.
An error occurred while receiving the HTTP response to http://localhost:52490/Service/CustomerService.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
Does it has anything to do with the IIS or is it any configuration file I have to change in the solution?
Any help is appreciated.
I am building an application and I am using web services for getting data from a server. It was working fine when I was developing on my XP machine but had to switch to Windows 7. On the new machine I grabbed the latest version of the code using sourcesafe.
However, when I try to add a service reference in the solution or update an existing one I get the following error:
There was an error downloading 'http://localhost:52490/Service/CustomerService.asmx'.
The request failed with the error message:
--
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'Digital_Server.CustomerSe
Source Error
<%@ WebService Language="vb" CodeBehind="CustomerServic
Source File: /Service/CustomerService.a
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
<!--
[HttpParseException]: Could not create type 'Digital_Server.CustomerSe
at System.Web.UI.SimpleWebHan
at System.Web.UI.SimpleWebHan
at System.Web.Compilation.Sim
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.UI.WebServicePa
at System.Web.Services.Protoc
at System.Web.Script.Services
at System.Web.HttpApplication
at System.Web.HttpApplication
at System.Web.HttpApplication
-->
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:52490/Service/CustomerService.asmx'.
An error occurred while receiving the HTTP response to http://localhost:52490/Service/CustomerService.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
Does it has anything to do with the IIS or is it any configuration file I have to change in the solution?
Any help is appreciated.
Make sure you are using
binding="wsHttpBinding"
binding="wsHttpBinding"
ASKER
Hi ashok111,
You mean in the app.config file? It worked with basichttpbinding on my xp machine and my colleagues who build the project on a Windows 7 machine have no problem.
Even if the current service reference have basichttpbinding shouldn't I be able to add a new one when I have the service.asmx in the solution?
You mean in the app.config file? It worked with basichttpbinding on my xp machine and my colleagues who build the project on a Windows 7 machine have no problem.
Even if the current service reference have basichttpbinding shouldn't I be able to add a new one when I have the service.asmx in the solution?
Is this Web Based application? Not that it matters.
ASKER
No it's not
it's a WPF application using some web services for getting data from a server
it's a WPF application using some web services for getting data from a server
ASKER
inner exception to error above:
InnerException: System.Net.WebException
Message="The underlying connection was closed: An unexpected error occurred on a receive."
Source="System"
StackTrace:
at System.Net.HttpWebRequest. GetRespons e()
at System.ServiceModel.Channe ls.HttpCha nnelFactor y.HttpRequ estChannel .HttpChann elRequest. WaitForRep ly(TimeSpa n timeout)
InnerException: System.IO.IOException
Message="Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
Source="System"
StackTrace:
at System.Net.ConnectStream.R ead(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.HttpWebRequest. MakeMemory Stream(Str eam stream)
InnerException: System.Net.Sockets.SocketE xception
ErrorCode=10054
Message="An existing connection was forcibly closed by the remote host"
NativeErrorCode=10054
Source="System"
StackTrace:
at System.Net.Sockets.Network Stream.Rea d(Byte[] buffer, Int32 offset, Int32 size)
InnerException:
InnerException: System.Net.WebException
Message="The underlying connection was closed: An unexpected error occurred on a receive."
Source="System"
StackTrace:
at System.Net.HttpWebRequest.
at System.ServiceModel.Channe
InnerException: System.IO.IOException
Message="Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
Source="System"
StackTrace:
at System.Net.ConnectStream.R
at System.Net.HttpWebRequest.
InnerException: System.Net.Sockets.SocketE
ErrorCode=10054
Message="An existing connection was forcibly closed by the remote host"
NativeErrorCode=10054
Source="System"
StackTrace:
at System.Net.Sockets.Network
InnerException:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
An error occurred while receiving the HTTP response to http://localhost:52490/Service/OrderService.asmx. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down)
Must be something with IIS?
In XP it was easier, just install IIS and good to go, with Win 7 there are so many settings.