How Deploy Asp.Net Web Service??

Discussion in 'Site Programming, Development and Design' started by sogreen, Aug 10, 2010.

  1. Hi, i receive the follow error when try run a asp.net web service

    Parser Error
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not create type 'WebService'.

    Source Error:


    Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %>



    Source File: /WebSite11/WebService.asmx Line: 1


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4205



    my webservice contains this:

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.Services;

    /// <summary>
    /// Summary description for WebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class WebService : System.Web.Services.WebService {

    public WebService () {

    //Uncomment the following line if using designed components
    //InitializeComponent();
    }

    [WebMethod]
    public string HelloWorld() {
    return "Hello World";
    }

    }

    I use .NET Framework 2.0.

    my WebService.asmx contains this:

    <%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %>


    the file WebService.cs is actually in the folder App_Code in my project


    Help me please!

    Thanks
     
  2. Ray

    Ray

    Do you have a URL for us to look at?
     
  3. Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015
  5. Perfect!!!.. Thanks
     
  6. Success again! Glad it's working for you.
     

Share This Page