我开发了一个aspx网站,它使用OrganizationServiceProxy和OrganizationServiceContext来查询CRM webservice 在我的localhost中它会很好但是当我在服务器中部署网站时我有一个例外
ClientCredentials credentials = new ClientCredentials();
credentials.Windows.ClientCredential = (NetworkCredential)System.Net.CredentialCache.DefaultCredentials;
OrganizationServiceProxy _service = new OrganizationServiceProxy(new Uri("http://../XRMServices/2011/Organization.svc"), null, credentials, null);
OrganizationServiceContext _context = new OrganizationServiceContext(_service);
WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse userResponse = (WhoAmIResponse)_service.Execute(userRequest);