Hi,
> Okay, I've seen about 4 years' worth of posts about this with no
> viable solutions. I've spent 9 hours today trying to fix this. It
[quoted text clipped - 15 lines]
> Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/
> BaseTaskWS.cs" Class="BaseTaskWS" %>
How did you publish the code-behind to the web? The class BaseTaskWS is
not found.
In ASP.NET 2.0, there are three ways to publish web services:
1) Using the "New website" menu to create your project, you then copy
the source code files to the web server together with your other, usual
files (ASPX, ASMX...). No DLL involved here, the source code files will
be compiled on the fly. In that case, the reference to the class is
added using the same syntax as you copied above, but the class file must
be copied to the web server too.
2) Using the same option, but then using the "Build / Publish" menu.
This will precompile the site, creating a DLL. In this process, you
cannot specifiy the DLL's name. If you used the "publish" option, then a
"bin" folder is created and the DLL is found in that.
3) Using the Web Application Project (WAP) add-on. In this case you use
the menu "New project" and then under "Web" you select the "Web service
application" template. In that case, it's much more like ASP.NET 1.1,
and it's rather recommend to work with that add-on.
The WAP add-on is part of VS2005 SP1, but if you don't have SP1, you can
also install it separately from here:
http://webproject.scottgu.com/
I realize that this information might not be the cause of the problem,
but it's a start, so don't hesitate to ask more if that doesn't solve
your problem.
HTH,
Laurent

Signature
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
JT - 22 Feb 2007 17:31 GMT
Hi Laurent,
Thanks for your reply. I used method 2.
Here's what caused my problem:
I created my virtual directory using the Helm control panel. The
instructions in my web host's knowledge base were very clear. I
didn't refer to the knowledge base. The path to my directory was
wwwroot/Services/BaseSecurity. The virtual directory was called
BaseSecurity, meaning I would reference it by wwwroot/BaseSecurity. I
was referencing it by wwwroot/Services/BaseSecurity. It didn't know
that was the same thing. I was giving it a true physical path, not a
virtual directory path. I've made them all the same so I don't forget
in the future and waste another day.
Note: No hard drives were harmed in the development of this web
service.
JT