Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

Web Service works locally but not on the host Server , i have use web service in web form , it's working locally but when i try to upload to server using FTP it's not working . please suggest me ...

ServiceEmployee.asmx

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


ServiceEmployee.cs

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Configuration;
using System.Data.SqlClient;
using System.Web.Script.Serialization;

/// <summary>
/// Summary description for ServiceEmployee
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class ServiceEmployee : System.Web.Services.WebService {

    public ServiceEmployee () {

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

    public class Employee
    {
        public string value { get; set; }
        public string text { get; set; }

    }
    public class Client
    {
        public string value { get; set; }
        public string text { get; set; }

    }
    public class Deploy
    {
        public string title { get; set; }
        public string start { get; set; }

    }



}




Am using ServiceEmployee.cs file in AppCode folder

ERROR LIKE THIS

XML
Server Error in '/' Application.

Parser Error

<pre lang="c#">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 'ServiceEmployee'.

Source Error:


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

Source File: /AbileSGMS/ServiceEmployee.asmx    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.6421; ASP.NET Version:2.0.50727.6427
Posted
Comments
Afzaal Ahmad Zeeshan 3-Aug-15 10:07am    
The error message is not clear, the stack trace or the inner message would be helpful.
prasanna.raj 3-Aug-15 10:42am    
i think it's a client side error how can i take trace , would u know kindly tell me..?
Richard MacCutchan 3-Aug-15 11:40am    
How can that be a client side issue? The message is explicitly telling you where on the server the problem is.
prasanna.raj 4-Aug-15 8:55am    
i think its not a server side if it's in server side mean it ll exception by try catch concept na ... thats it i told like that ...
Richard MacCutchan 4-Aug-15 8:58am    
Yes, but you don't have a try/catch.

Read the error message carefully, it tells you everything you need to know.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900