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.CustomerService'.

            Source Error


<%@ WebService Language="vb" CodeBehind="CustomerService.asmx.vb" Class="Digital_Server.CustomerService" %>

Source File: /Service/CustomerService.asmxLine: 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.CustomerService'.
   at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
   at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
   at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
   at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
   at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep 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.
msglAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

msglAuthor Commented:
Also, if I build the application and use a control that tries to use an existing reference I get the following error

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.
0
AshokSr. Software EngineerCommented:
Make sure you are using
binding="wsHttpBinding"
0
msglAuthor Commented:
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?
0
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

AshokSr. Software EngineerCommented:
Is this Web Based application?  Not that it matters.
0
msglAuthor Commented:
No it's not
it's a WPF application using some web services for getting data from a server
0
msglAuthor Commented:
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.GetResponse()
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan 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.Read(Byte[] buffer, Int32 offset, Int32 size)
                 at System.Net.HttpWebRequest.MakeMemoryStream(Stream stream)
            InnerException: System.Net.Sockets.SocketException
                 ErrorCode=10054
                 Message="An existing connection was forcibly closed by the remote host"
                 NativeErrorCode=10054
                 Source="System"
                 StackTrace:
                      at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                 InnerException:
0
msglAuthor Commented:
I right-clicked on the service, set is as start page and then set the server layer as project startup, built it and now it works.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.