无法创建类型问题 [英] Could not create type problem

查看:117
本文介绍了无法创建类型问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我已经构建了一个Web服务,并且在我的compuetr中可以正常工作.当我在托管中发布它时,会说

I have built a web service, and it works fine in my compuetr. When I publish it in my hosting it says

描述:在解析服务于此请求所需的资源期间发生错误.请查看以下特定的解析错误详细信息,并适当地修改您的源文件.
解析器错误消息:无法创建类型"CalculatorService.WebService1".
源错误:

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 ''CalculatorService.WebService1''.
Source Error:

<pre>Line 1:  <%@ WebService Language="C#" CodeBehind="WebService1.asmx.cs" Class="CalculatorService.WebService1" %>
</pre>

版本信息::Microsoft .NET Framework版本:2.0.50727.3053; ASP.NET版本:2.0.50727.3053

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

我的代码是在ASP.NET 3.5 Web服务项目中编写的.

My code is written in a ASP.NET 3.5 web service project.

托管文件夹指向.net版本2.0/3.0/3.5.它在Godaddy托管中.

The hosted folder points to .net version 2.0/3.0/3.5. It is in Godaddy hosting.

有人知道如何解决吗?

推荐答案

CalculatorService.WebService1的构造函数可能会抛出异常,请注释掉其中的所有代码
The constructor for CalculatorService.WebService1 may be throwing an exception, comment out all code in constructor and try again.


我没有开发过任何构造函数.

There is no constructor developed by me.

此外,这在本地还行得通!

Besides all, this works fine locally!


这篇关于无法创建类型问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆