Solved

.NET 2013 ASMX Web Service Could Not Create Type

Posted on 2015-01-19
11
496 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:
navneethegde earned 250 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account 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 250 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

697 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