Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.NET 2013 ASMX Web Service Could Not Create Type

Posted on 2015-01-19
11
Medium Priority
?
626 Views
Last Modified: 2015-01-29
I upgraded a .NET 2008 app to 2013.  There is a web service in the application.  I am receiving below error:

Could not create type 'PremiumAdmin.webService.getInsuredInfo'.      

I think the issue is associated with the class on the ASMX page.  

ASMX
<%@ WebService Language="c#" Codebehind="~/App_Code/webService/getInsuredInfo.asmx.cs" 
    Class="PremiumAdmin.webService.getInsuredInfo" %>

Open in new window


ASMX.cs
namespace PremiumAdmin.webService
{
	/// <summary>
	/// Summary description for getInsuredInfo.
	/// </summary>
	[WebService(Namespace="http://mywebsite.com/webservices/")]
	public class getInsuredInfo : System.Web.Services.WebService
	{
		public getInsuredInfo()
		{
			//CODEGEN: This call is required by the ASP.NET Web Services Designer
			InitializeComponent();
		}

Open in new window


This does not have issues in .NET 2008.  Any ideas?

Thanks
0
Comment
Question by:CipherIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 15

Accepted Solution

by:
Navneet earned 1000 total points
ID: 40559245
HI!

make that  markup as

<%@ WebService Language="c#" Codebehind="getInsuredInfo.asmx.cs" 
    Class="PremiumAdmin.webService.getInsuredInfo" %>

Open in new window






Thanks!
Navneet
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40559754
That is what I have.  It's not working.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40560090
How many web methods do you have?

How complex is the web service?

Would recreating in WCF be a possibility?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Author Comment

by:CipherIS
ID: 40560101
Can't create a WCF at the moment.  I created a web application.  I copied the .NET 2008 website to the .NET 2013 web app.  I included all the files.  When compiling I am getting that it can't create the type.

Also, on the asmx page it says on the codebehind="~/App_Code/webService/getInsurcedInfo.asmx.cs" (when I hover over it) that it can't find that file but the file is exactly there.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40560765
I believe that this is a case where migration doesn't work.

The attribute in your file is "Codebehind", but in the new file, it is "CodeBehind".  Try changing the attribute to "CodeBehind".

<%@ WebService Language="C#" CodeBehind="EchoWebService.asmx.cs" Class="EchoWebService.EchoWebService" %>

Open in new window

0
 
LVL 1

Author Comment

by:CipherIS
ID: 40561785
Changed it to "CodeBehind".  Doesn't work.
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 1000 total points
ID: 40562103
Can you do a quick test, by creating a new web service, and adding a web method,

1) Create an empty ASP.NET web project

2) Set target framework to 4.5

3) Add an .asmx web service

4) Add a web method

5) Compile
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40573854
That works.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40574359
There is something going on that I can't see.  

What files are included in the project?

"I copied the .NET 2008 website to the .NET 2013 web app.  I included all the files.  When compiling I am getting that it can't create the type."
Can you explain how you did this?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40578292
I started the migration again and its working.  Don't know why now.
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40578295
Thanks for your help.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question