我有以下代码:
EndpointAddress endpointAddress = new EndpointAddress("http://www.verifythisaddress.com/AddressVerification/AddressVerificationService.svc");
BasicHttpBinding serviceBinding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
serviceBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
serviceBinding.ReceiveTimeout = new TimeSpan(0, 0, 120);
AddressService.IAddressVerificationService client = new AddressService.AddressVerificationServiceClient(serviceBinding,endpointAddress);
AddressService.Address verifiedAddress = null;
当我使用客户端应用程序运行此代码时,一切正常,但是当我在另一个应用程序中运行它时,相同的代码。我收到“Access is Denied”错误。这可能是IIS问题吗?我的问题是为什么它适用于Windows窗体应用程序,但不适用于其他应用程序。 感谢