When developing a webservice
And when deploying to production server
using WindowsApplication3.MossCrm;
string mossUserName = ConfigurationSettings.AppSettings["UserName"].ToString();
string mossPassword = ConfigurationSettings.AppSettings["Password"].ToString();
string mossDomain = ConfigurationSettings.AppSettings["Domain"].ToString();
string mossWebServiceUrl = ConfigurationSettings.AppSettings["WebServiceUrl"].ToString();
MossCrm.Service service = new MossCrm.Service();
service.Credentials = new System.Net.NetworkCredential(mossUserName, mossPassword, mossDomain);
service.Url = mossWebServiceUrl;
App.config
.
No comments:
Post a Comment