ASMX: Setting User/Password at run-time
问题 When I want to connect to my web service If I write it like this: m_TransferServiceSoap.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; it is working. but I need a Login Form. so users can enter their user/pass so I am creating a NetworkCredential instance and setting its user/pass members from what I get from that login form and then instead of using the line above I am writing this one: m_TransferServiceSoap.Credentials = userpass; // the instance above. but in this way