PDA

View Full Version : Publishing a Web Service created with VS 2005


wwv
06-04-2006, 02:55 AM
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:





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

Source File: E:\web\wwvitcom000\htdocs\TestWebService2005\Servi ce.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(Strin g typeName)
at System.Web.UI.SimpleWebHandlerParser.GetCompiledTy peInternal()
at System.Web.UI.SimpleWebHandlerParser.GetCompiledTy pe()
at System.Web.UI.SimpleWebHandlerParser.GetCompiledTy peFromCache()
at System.Web.UI.WebServiceParser.GetCompiledType(Str ing inputFile, HttpContext context)
at System.Web.Services.Protocols.WebServiceHandlerFac tory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
at System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.-->

bruce
06-04-2006, 05:23 AM
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 (http://www.DiscountASP.NET)

wwv
06-20-2006, 09:38 AM
Thank you Bruce!