I have a very simple test web service (old school - not WCF) that works perfect on my local dev machine but when I place it in a test folder on Winhost - I get a "could not create type" error. This is a 3.5 vs 2008 project type. It's a simple method that takes in three ints and returns a int sum. The test folder is located at http://www.variablemanufacturingsoftware.com/test/ and the service file is called Service1.asmx. I've googled and searched and racked my brain trying to solve this on my own but clearly I'm missing something. Lots of similar help issues on the net about this error, but I've tried to no avail all their suggestions. Could listed below - BTW - I've already tried pointing the asmx Codebehind declaration to point to the App_Data folder (in multiple variations) and that didn't help either. I'm sure it's something simple but I'm missing what it is. Thanks in advance. devon // asmx file <%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="Test.Service1" %> /// code behind file using System; using System.Collections.Generic; using System.Web; using System.Web.Services; namespace Test { [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class Service1 : System.Web.Services.WebService { [WebMethod] public int AddThreeNumbers(int x, int y, int z) { return x + z + y; } } }
Try setting the subfolder test as an application folder. Refer to this kb article. http://support.Winhost.com/KB/a635/what-is-the-application-starting-point-tool.aspx