Error 2 The type or namespace name 'ConnectionOptions' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\user\Documents\Visual Studio 2010\WebSites\Service\App_Code\PService.cs 55 10 C:\...\Service\
尝试使用代码时
[WebMethod]
public ConnectionOptions remoteconnection(string MyComputerName, string ip)
{
ConnectionOptions connOptions = new ConnectionOptions();
return connOptions ;
}
虽然在 webApplication 中复制相同的代码时没有错误。我在两个文件中都使用了 system.Management 。