473,419 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Error while creating a web service - Could not create type 'Service'.

I'm creating a webservice in vb.net version 2.0 on my local machine, deploying it to v1.1 on development server and getting an error "Could not create type 'Service'." Below is the code snippet that I wrote to create a web service

- Service.asmx file
Expand|Select|Wrap|Line Numbers
  1. <%@ WebService Language="vb" CodeBehind="~/App_Code/Service.vb" Class="Service"%>
  2.  
- Service.vb file in "App_Code" folder
Expand|Select|Wrap|Line Numbers
  1. WebService(Namespace:="http://www.abc.com/Service")> _
  2. <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
  3. <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
  4. Public Class Service
  5.     Inherits System.Web.Services.WebService : Implements IHttpHandler
  6.  
  7.     <WebMethod()> _
  8.    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
  9.         Dim files As HttpFileCollection = context.Request.Files
  10.         Dim parameters As NameValueCollection = context.Request.Params
  11.         Dim UserKey = parameters("userKey")
  12.         Dim message = parameters("message")
  13.         Dim listenToLink = parameters("listen")
  14.         Dim CreateDate = parameters("CreationDate")
  15.  
  16.     End Sub
  17.     Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.IsReusable
  18.         Get
  19.             Return True
  20.         End Get
  21.     End Property
  22. End Class
  23.  
While deploying this web service to the online development server I copied the App_Code(along with Service.vb file) file to the root directory of source code and copied Service.asmx file to the root directory and tried to run the web service in a below mentioned way (URL is just for example it is not actual URL of my site)

http://www.abc.com/service.asmx

after executing the above mentioned URL I'm getting errror
Expand|Select|Wrap|Line Numbers
  1. Parser Error Message: Could not create type 'Service'.
  2.  
  3. Source Error: 
  4.  
  5.  
  6. Line 1:  <%@ WebService Language="vb" 
  7. CodeBehind="~/App_Code/Service.vb" Class="Service"%>
  8.  
.

Please note that, I CANT CHANGE ASP.NET Version from 1.1 to 2.0.

Any help will be greatly appreciated,

Please review and provide good solution.

Thanks in advance

Swapnil
May 12 '10 #1
1 4744
Frinavale
9,735 Expert Mod 8TB
You can specify which framework to target in your BUILD using Visual Studio though :)

-Frinny
May 18 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
1
by: Troy Murphy | last post by:
I am attempting to follow the walkthru: Creating a Windows Service Application in the Component Designer. I get the error: JIT Debugging failed with the following error: Access is Denied. JIT...
1
by: dotNetDave | last post by:
I keep getting the following error on one of my web service pages: Parser Error Parser Error Message: Could not create type 'SyPixx.Web.ClearService.ConfigureAlarms'. Source Error: Line 1: ...
1
by: Vinay Jain | last post by:
Hi I am newbie so this problem may be too simple to be asked.please help me if any new thing to be added in following: I want to use user defined data type in User_Type(n) way.... I created...
7
by: MarkoH | last post by:
Wsdl.exe /server creates abstract class derived from WebService. Is there a way to create this class at runtime based on some WSDL file given at runtime ? What would be even better - creating...
0
by: Rotsey | last post by:
Hi, I have just installed VS 2005 on a XP Pro PC with IIS 5.0. I already have VS2003 installed. I am trying to create a "Hello World" web service and publish it to a remote server that is...
8
by: ctiggerf | last post by:
I was hopeing someone could help me out here. Been stumped on this one all day. This function 1. Checks uploaded files. 2. Creates two resized images from each (a full size, and a...
2
by: JT | last post by:
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...
1
by: =?Utf-8?B?cm9zczYxMw==?= | last post by:
I'm puzzled by an error message encountered while creating a Windows Service. In particular, I'm creating a second Windows Service within a Windows Service project, using Visual Studio 2005. The...
1
by: xuki | last post by:
Hi every one! I need your help to solve this problems. I'm trying to creat a wsdl file to a webservice but i'm getting an erros. "Error creating WSDL document:Error creating WSDL: no class...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.