473,597 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not create type 'xxx' (trying to add web reference to project)

JT
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
works BEAUTIFULLY on my local IIS installation, but when I publish to
my web host and try to add a web reference I get the following:

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

Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/
BaseTaskWS.cs" Class="BaseTask WS" %>

Source File: /Services/BaseTask/BaseTaskWS.asmx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET Version:2.0.507 27.210

I have created plenty of web services. I have had two hosted by my
web host for months. They worked fine. Now I've published this and
tested it and I get that error. Also, my original two give me the
exact same error. I can see that the overall site is set to .NET 2.0,
but I can't see what the virtual directories are set to. The tech
support guy says that it defaults to the same as the overall site, but
he hasn't verified that it really is the same. Either this is the
worst initiation joke ever, or no one really knows how to fix it or
ever posts the true fix. Could some MS MVP or other guru please help
me out with this? I promise I'll post the answer for everyone else
that stumbles into this. I've tried just about everything I've seen
in all the posts in this forum and as many others as I could find in a
day and nothing fixes it.

I have a really big magnet, and I'm not afraid to use it! Don't make
me go there...

Thanks,

JT

Feb 20 '07 #1
2 9178
Hi,

JT wrote:
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
works BEAUTIFULLY on my local IIS installation, but when I publish to
my web host and try to add a web reference I get the following:

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

Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/
BaseTaskWS.cs" Class="BaseTask WS" %>
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
--
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
Feb 20 '07 #2
JT
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

Feb 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2111
by: Kevin Rose | last post by:
I upgraded by VS.NET to v2003 and I'm now attempting to upgrade all my project files. I have a solution with several projects. In project A is a interface called IForm which has 2 events: DBOperationComplete and DBOperationFailed. In project B is a Windows form which implements IForm. The IForm namespace is 'UI.Base' I'm getting a build error "Type 'UI.Base.IForm.DBOperationFailedEventHandler' is not defined." The odd thing is that the...
1
2606
by: Rob R. Ainscough | last post by:
I keep getting this error message when I build my solution: Error: The dependency 'xxx.xx.xx, Version=1.0.2067.27633, Culture=neutral' in project 'xxx.xx.xx' cannot be copied to the run directory because it would conflict with dependency 'xxx.xx.xx, Version=1.0.2068.11260, Culture=neutral'. I have a solution that contains 10 class library projects, some of these projects require references to other projects within the solution....
2
1220
by: Richard Lewis Haggard | last post by:
I know this is a really simple thing but it is not intuitively obvious on how to do this the first time. I've created a remote server which lives in an EXE. This compiles. I've create a client of the remote server which fails to compile due to a failure of the 'using' line that would import the server class's definition. I can't figure out how to add the server as a reference because the server is an EXE, not a DLL.
0
1270
by: Jahyen | last post by:
I'm trying to create a new web project using File...New...Project. The web server is on the internet and has FP2002 extensions installed. I can connect to the server using FP2002. If I try to type in the address of the web server (https://www.xxx.yyy) in the create project dialog box I get a 403 access denied in visual studio when I press OK. However, I can still click the browse button in the dialog and browse to the web server and...
11
3114
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the current entries for that page, and adds a new entry with some information regarding the current...
17
3297
by: Chris Podmore | last post by:
When I perform: EventLog.WriteEntry(strSource, strEntry, EventLogEntryType.Error, intEventID) The event viewer reports The description for Event ID ( 234 ) in Source ( Siclops_WS_Mobile ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. I think I need to create a dll that returns error messages for event ID’s.
4
353
by: vncntj | last post by:
I've tested this project locally, by running it http://localhost:1436/Data/gift.aspx and everything is perfect. But if it onto the remote server I get "The type or namespace name could not be found" this is my gift.aspx.cs *************************************** using System; using System.Data;
0
441
by: Rubber_Soul | last post by:
Hi, I create an application in VS2005 C#. There is some data which I send to a WebService to a company XXX. In my project I've added a Web reference to their WebServices and everything works great. But now i have to create my own WebService which should works with requests sending from their applications. They (company XXX) sent me a WSDL file witch contains all classes and method that I should to implements. And the problem is, how to...
4
1273
by: RSH | last post by:
Hi, I have a situation where I have a class which manages different data connections. In trying to enforce encapsulation I have a member field called connection which could be a type of SQLConnection, or OleDBConnection etc. When I am setting up the field how can I say it might be type of SQl or type of OleDb? or...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.