WindowsForms里可以调用的dll,在webServices里如何调用?
我这里有一个加密解密的dll,在WindowsForms工程里可以正确调用,但在Web services里怎么都看不到效果:
WindowsForms里
using passt; //引用
过程里调用:
private passt.testclass passtdec;
userPassword =passtdec.passtEncrypt(txtPass.Text);
但在Webservices里,在解决方案里引用dll后,然后:
using passt; //引用
在class Service里
[WebMethod]
private passt.testclass passtdec;
public string decode2()
{
passtdec = new passt.testclass();
return passtdec.passtEncrypt("123");
}
调用就报错:
编译器错误消息: CS0592: 属性“WebMethod”在该声明类型中无效。它只在“method”声明中有效。