Simple Webservice - can't deploy on Winhost

Discussion in 'General troubleshooting' started by devonk, Oct 8, 2010.

  1. 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
    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.

    // 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)]

    public class Service1 : System.Web.Services.WebService

    public int AddThreeNumbers(int x, int y, int z)
    return x + z + y;

  2. Ray


    Last edited by a moderator: Oct 14, 2015
  3. Ray - thank you so much!
    that did the trick!

Share This Page