Web服务无法创建类型的错误与在GAC型 [英] web service could not create type error with type in the GAC

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

问题描述

,似乎是我喜欢做的事情,这不是很常见的。

Stuck with an unusual problem, would seem that I love doing things that's not very common.

我有一个复合控件,即检查是否指定的Web服务文件存在于我的应用程序的根目录下,如果没有,它会创建必要的指令文件中的标记来球滚动,这样的:

I have a composite control, that checks to see if a given web service file exists in the root of my application, if it does not, it creates the file with the necessary directive in the markup to ball rolling, something like:

<%@ WebService Language="C#" Class="Company.Project.Assembly.ClassName" %>



进而,被保存到输出。一旦这一步已经完成,在应用程序池回收启动来获得在IIS中呈现的新的一页。

which in turn, gets saved to the output. Once this step has been completed, a recycle on application pool is initiated to get the new page rendered within IIS.

我组装的指令点,是海关总署部署,但由于某些原因,ARB时ASMX通过IIS服务被忽略。如果我组装复制到BIN目录中的应用是工作得很好,不过,我想我的SharePoint服务器场中部署该解决方案为Web部件更新,并在我的应用程序已经启用完全信任不是我想的路线去了。

My assembly that the directive points to, is GAC deployed, but for some arb reason is being ignored when the ASMX is served through IIS. If I copy the assembly into the BIN directory for the application is works fine, however, I would like to deploy this solution as a web part update within my SharePoint farm and having FULL trust enabled in my application is not a route I would like to go.

时是正确的,我假设ASMX文件或从一个类继承中的任何文件GAC部署的组件被忽略?我不明白为什么这会是,据我所知,IIS会尝试使用地图的程序集的BIN,如果找不到它会去询问GAC,看它是否能够找到它还有,是否正确?

Is is correct in my assumption that ASMX files or any file that inherits from a class within a GAC deployed assembly is ignored? I don't see why this would be, as far as I'm aware, will IIS try an map the assembly in the BIN, if it could not be found will it go and interrogate the GAC to see if it can find it in there, correct?

推荐答案

当您在GAC中引用的Web服务组件,您需要使用汇编类的全名像这样的:

When you reference a web service assembly in the GAC, you need to use the full class name with assembly like this:

<%@ WebService的语言=C#类=Company.Project.Assembly.ClassName,Company.Project.Assembly ,版本= 1.0.0.0,文化=中性公钥= 0000000000000000%GT;

我们也到SharePoint部署Web服务,而这完全适用于我们。

We also deploy web services to SharePoint, and this works perfectly for us.

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

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