I need to add the solution I found for this issue for future readers, as this is one of the 1st posts that comes up when searching for the following exception:
"Could not create type 'MyService'"
My situation occured in upgrading my .asmx web service from VS.NET 2005 to VS.NET 2008
and targeting the new .NET Framework 3.5.
I checked all of the reccomendations on all of the sites about ASP.NET in IIS being 1.1...etc and none of them were applicable. This site has a
great checklist BTW:
Anyways, I was able to install the web setup package created from Visual Studio 2008 both on my development machine and test server producing the
same error on both. But if I went back and installed the old package made from VS.NET 2005 everything worked fine. Also this obviously had nothing to do with the .NET Framework 3.5 being installed because it is installed on both.
I also tried targeting the old 2.0 Framework and rebuilding the setup package, but I had the same results.
The solution for me, was to delete the web setup project in my web service solution and create a brand new one from scratch. Notice how in VS 2008 there is a target framework dropdown; I am not sure if that had anything to do with it, but
I made sure 3.5 was selected. I re-added the primary output, content files, set all of the properties and re-built the web setup package.
The install worked and I could then pull up the .asmx web service with no probelms at all. So for me, something was being grandfathered in that old setup package project that when installed
even after re-build, was not acting correctly.
atconway
All-Star
16846 Points
2756 Posts
Re: web service error 'could not create type '
Sep 22, 2009 08:50 PM|LINK
I need to add the solution I found for this issue for future readers, as this is one of the 1st posts that comes up when searching for the following exception:
"Could not create type 'MyService'"
My situation occured in upgrading my .asmx web service from VS.NET 2005 to VS.NET 2008 and targeting the new .NET Framework 3.5.
I checked all of the reccomendations on all of the sites about ASP.NET in IIS being 1.1...etc and none of them were applicable. This site has a great checklist BTW:
http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=133
Anyways, I was able to install the web setup package created from Visual Studio 2008 both on my development machine and test server producing the same error on both. But if I went back and installed the old package made from VS.NET 2005 everything worked fine. Also this obviously had nothing to do with the .NET Framework 3.5 being installed because it is installed on both.
I also tried targeting the old 2.0 Framework and rebuilding the setup package, but I had the same results.
The solution for me, was to delete the web setup project in my web service solution and create a brand new one from scratch. Notice how in VS 2008 there is a target framework dropdown; I am not sure if that had anything to do with it, but I made sure 3.5 was selected. I re-added the primary output, content files, set all of the properties and re-built the web setup package.
The install worked and I could then pull up the .asmx web service with no probelms at all. So for me, something was being grandfathered in that old setup package project that when installed even after re-build, was not acting correctly.
Hope this helps future readers.