我用XML WEB与WEB站点进行交互,所以在WebServices里写了一段用于测试应用程序状态的代码,但是在应用程序里调用Web服务时却出现了"异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。"的错误!还望各位高中给予帮助!!谢谢啦!
    Web服务代码如下:
                  [WebMethod]
public int GetAppService()
{
Application["Counter"] = (int)Application["Counter"] + 1;
return (int)Application["Counter"];
}