views:

281

answers:

3

I had VS 2005 with v2.0 of the framework. Then I installed NDoc recently and that supports only v1.1, so it installed v1.1 on top of v2.0. That is fine because both versions can co-exist but what it did was screw up some settings with:

a) The web server that comes with ASP.NET, the one you run your web services on in debug mode.

b) SQL Server's active CLR settings (but this isn't bothering me as much)

c) IIS settings (but I fixed this by re-registering IIS with 2.0)

What's bothering me to the hilt now is the broken ASP.NET web server won't allow me to debug my Web services or even have another project in the same solution create a web reference to it.

I can't generate proxies in Visual Studio because of this, nor can I set a web reference to a web service in the same solution (as it involves generating a proxy).

Note that I can call wsdl.exe though. But I don't want to deploy my service yet. I just want all projects in the same solution referencing the ws like well-behaved little kids.

When I do try to create a web reference to the WS project in my solution, I keep getting this error:

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 'DaWS.PhoneDirectory'.

Source Error:

Line 1: <%@ WebService Language="C#" CodeBehind="PhoneDirectory.asmx.cs" Line 2: Class="DaWS.PhoneDirectory" %>

Source File: /PhoneDirectory.asmx Line: 2


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

It's been nagging me for days now and I've been managing with deploying in IIS.

Other than re-install Visual Studio, does anyone have a better solution?

A: 

Create a new web service, and do not change it at all. See if it works.

BTW, the fact that this page displays .NET 2.0 and not 1.1 suggests version is not the problem.

John Saunders
That code above was for a sample new Web service. It happens with all Web services -- old or the new ones I create.
Ok, but did you touch it at all after you created it?
John Saunders
Also, did you build the service before you tried to create a web reference to it?
John Saunders
A: 

How are you adding the web service reference via URL or a project in the solution?

hipplar
Project in the solution.
Does the WS compile fine?
hipplar
Yup, it does. Also note that if I deploy the WS in IIS, generate a proxy using wsdl.exe, add the reference.cs (proxy) to one of my projects, and then change the url in the proxy to point to the locally deployed WS, it all works.It's just the development web server that doesn't.Here's some information from my event log:
Event Type: WarningEvent Source: ASP.NET 2.0.50727.0Date: 06/05/2009Time: 12:04:33 AMDescription:Event code: 3006Event message: A parser error has occurred.Event time: 06/05/2009 12:04:33 AMEvent time (UTC): 05/05/2009 6:34:33 PMApplication information: Application domain: a54e0deb-1-128860220726250000 Trust level: Full Application Virtual Path: / Application Path: C:\Me\rnd\DotNet\DoIndexersGetSerialized\DaWS\ Machine name: ABCDProcess information: Process ID: 660 Process name: webdev.webserver.exe Account name: Domain\Me
A: 

Is it possible that you deploy your webservice from a zip-file without the paths.

So that the DaWS.dll file is in the root directory?

tom