调用WebService出现的问题

claus2001 2005-03-18 11:03:29
[WebMethod]
public int getPrice(int ID)
{
return ((ID - 0) * 5) / 9;
}
调用的时候出错如下
System.IO.FileNotFoundException: File or assembly name 4zggg3_t.dll, or one of its dependencies, was not found.
File name: "4zggg3_t.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings)
at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\WINDOWS\TEMP\4zggg3_t.dll
LOG: Appbase = file:///D:/aspexample/test
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINDOWS/TEMP/4zggg3_t.dll.

这是什么问题?
...全文
161 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhouzh197895 2005-03-18
  • 打赏
  • 举报
回复
如果"((ID - 0) * 5) / 9"不是int型數據﹐當然會報錯。
claus2001 2005-03-18
  • 打赏
  • 举报
回复
怎样解决?
startboy119 2005-03-18
  • 打赏
  • 举报
回复
这个问题跟你的方法没有任何关系,可能是你的webservice配置或引用出现问题
claus2001 2005-03-18
  • 打赏
  • 举报
回复
没人知道是什么问题吗?
claus2001 2005-03-18
  • 打赏
  • 举报
回复
是和方法没关系的,好像是配置的问题,换成其他的方法也一样报同样的错误.
这到底是哪里配置错误,有人碰到同样的问题吗?

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧