Publishing a Web Service created with VS 2005

Discussion in 'ASP.NET WebServices' started by wwv, Jun 4, 2006.

  1. wwv

    wwv

    Hi,</o:p>
    There was no problem to publish a Web Service created with VS 2003. </o:p>
    Now I have created a Web Service created with VS 2005. Locally it works fine. But on the server site I got the following error:</o:p>
    Please help me to solve the problem.</o:p>
    Valentin


    Server Error in '/TestWebService2005' Application.


    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 'Service'.

    Source Error:





    Code:
    Line 1:  <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %>
    
    Source File: E:\web\wwvitcom000\htdocs\TestWebService2005\Service.asmx Line: 1



    Version Information:Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 <!--
    [HttpParseException]: Could not create type 'Service'.
    at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
    at System.Web.UI.SimpleWebHandlerParser.GetCompiledTypeInternal()
    at System.Web.UI.SimpleWebHandlerParser.GetCompiledType()
    at System.Web.UI.SimpleWebHandlerParser.GetCompiledTypeFromCache()
    at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
    at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
    at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
    at System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    VS.net 2k5 generates ASP.NET 2.0 code.

    YOu'll need to switch the .NET on your hosting account to ASP.NET 2.0 (it is currently set to 1.1 based on the error message) in the IIS manager in the hosting control panel.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. wwv

    wwv

    Thank you Bruce!
     

Share This Page