A
Anil S
Hello,
my application is console application and I have created "Service Reference" of the webservices. this webservice uses username and password. my code are following:
myArray[] nl;
FeedSoapClient client = new FeedSoapClient();
client.ClientCredentials.UserName.UserName = "tellme";
client.ClientCredentials.UserName.Password = "tellme";
nl = client.getCustInfo();
int i = 0;
while (i <= (nl.Length - 1))
{
Console.WriteLine(nl.name + " " + nl.address);
i++;
}
ERROR which I am getting, is this:
System.Configuration.ConfigurationErrorsException: The value of the property 'cl
ientCredentialType' cannot be parsed. The error is: The enumeration value must b
e one of the following: None, Basic, Digest, Ntlm, Windows, Certificate. (C:\Use
rs\localhost\Documents\Visual Studio 2008\Projects\RetrieveRTDataFromNYISO\Retri
eveRTDataFromNYISO\bin\Debug\RetrieveRTDataFromNYISO.exe.Config line 28)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, Se
ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord
sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factor
yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boole
an getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey,
Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Intern
al.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetSectionFro
mConfigurationManager(String sectionPath)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociated
Section(ContextInformation evalContext, String sectionPath)
at System.ServiceModel.Configuration.ClientSection.UnsafeGetSection()
at System.ServiceModel.Description.ConfigLoader.LookupChannel(String configur
ationName, String contractName, Boolean wildcard)
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceE
ndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configuration
Name)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configuration
Name, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationNam
e, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 e
ndpointTrait)
at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase`1..ctor()
at RetrieveRTDataFromNYISO.ServiceReference.eDataFeedSoapClient..ctor() in C:
\Users\localhost\Documents\Visual Studio 2008\Projects\RetrieveRTDataFromNYISO\R
etrieveRTDataFromNYISO\Service References\ServiceReference\Reference.cs:line 154
5
at RetrieveRTDataFromNYISO.Program.Main() in C:\Users\localhost\Documents\Vis
ual Studio 2008\Projects\RetrieveRTDataFromNYISO\RetrieveRTDataFromNYISO\Program
..cs:line 26
can you tell me how to fix this problem? According to me, it is not accepting the username and password.
my application is console application and I have created "Service Reference" of the webservices. this webservice uses username and password. my code are following:
myArray[] nl;
FeedSoapClient client = new FeedSoapClient();
client.ClientCredentials.UserName.UserName = "tellme";
client.ClientCredentials.UserName.Password = "tellme";
nl = client.getCustInfo();
int i = 0;
while (i <= (nl.Length - 1))
{
Console.WriteLine(nl.name + " " + nl.address);
i++;
}
ERROR which I am getting, is this:
System.Configuration.ConfigurationErrorsException: The value of the property 'cl
ientCredentialType' cannot be parsed. The error is: The enumeration value must b
e one of the following: None, Basic, Digest, Ntlm, Windows, Certificate. (C:\Use
rs\localhost\Documents\Visual Studio 2008\Projects\RetrieveRTDataFromNYISO\Retri
eveRTDataFromNYISO\bin\Debug\RetrieveRTDataFromNYISO.exe.Config line 28)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, Se
ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord
sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factor
yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boole
an getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String co
nfigKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Bool
ean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey,
Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Intern
al.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetSectionFro
mConfigurationManager(String sectionPath)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociated
Section(ContextInformation evalContext, String sectionPath)
at System.ServiceModel.Configuration.ClientSection.UnsafeGetSection()
at System.ServiceModel.Description.ConfigLoader.LookupChannel(String configur
ationName, String contractName, Boolean wildcard)
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceE
ndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configuration
Name)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configuration
Name, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationNam
e, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 e
ndpointTrait)
at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase`1..ctor()
at RetrieveRTDataFromNYISO.ServiceReference.eDataFeedSoapClient..ctor() in C:
\Users\localhost\Documents\Visual Studio 2008\Projects\RetrieveRTDataFromNYISO\R
etrieveRTDataFromNYISO\Service References\ServiceReference\Reference.cs:line 154
5
at RetrieveRTDataFromNYISO.Program.Main() in C:\Users\localhost\Documents\Vis
ual Studio 2008\Projects\RetrieveRTDataFromNYISO\RetrieveRTDataFromNYISO\Program
..cs:line 26
can you tell me how to fix this problem? According to me, it is not accepting the username and password.