?
Solved

.NET 2013 ASMX Web Service Could Not Create Type

Posted on 2015-01-19
11
Medium Priority
?
586 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

764 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