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.ClientCr edentials.UserN ame.UserName = "tellme";
client.ClientCr edentials.UserN ame.Password = "tellme";
nl = client.getCustI nfo();
int i = 0;
while (i <= (nl.Length - 1))
{
Console.WriteLi ne(nl[i].name + " " + nl[i].address);
i++;
}
ERROR which I am getting, is this:
System.Configur ation.Configura tionErrorsExcep tion: The value of the property 'cl
ientCredentialT ype' 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\Do cuments\Visual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retri
eveRTDataFromNY ISO\bin\Debug\R etrieveRTDataFr omNYISO.exe.Con fig line 28)
at System.Configur ation.BaseConfi gurationRecord. EvaluateOne(Str ing[] keys, Se
ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord
sectionRecord, Object parentResult)
at System.Configur ation.BaseConfi gurationRecord. Evaluate(Factor yRecord factor
yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boole
an getRuntimeObjec t, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey,
Boolean getLkg, Boolean checkPermission )
at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey)
at System.Configur ation.ClientCon figurationSyste m.System.Config uration.Intern
al.IInternalCon figSystem.GetSe ction(String sectionName)
at System.Configur ation.Configura tionManager.Get Section(String sectionName)
at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetSectionFro
mConfigurationM anager(String sectionPath)
at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetAssociated
Section(Context Information evalContext, String sectionPath)
at System.ServiceM odel.Configurat ion.ClientSecti on.UnsafeGetSec tion()
at System.ServiceM odel.Descriptio n.ConfigLoader. LookupChannel(S tring configur
ationName, String contractName, Boolean wildcard)
at System.ServiceM odel.Descriptio n.ConfigLoader. LoadChannelBeha viors(ServiceE
ndpoint serviceEndpoint , String configurationNa me)
at System.ServiceM odel.ChannelFac tory.ApplyConfi guration(String configuration
Name)
at System.ServiceM odel.ChannelFac tory.Initialize Endpoint(String configuration
Name, EndpointAddress address)
at System.ServiceM odel.ChannelFac tory`1..ctor(St ring endpointConfigu rationNam
e, EndpointAddress remoteAddress)
at System.ServiceM odel.EndpointTr ait`1.CreateSim plexFactory()
at System.ServiceM odel.EndpointTr ait`1.CreateCha nnelFactory()
at System.ServiceM odel.ClientBase `1.CreateChanne lFactoryRef(End pointTrait`1 e
ndpointTrait)
at System.ServiceM odel.ClientBase `1.InitializeCh annelFactoryRef ()
at System.ServiceM odel.ClientBase `1..ctor()
at RetrieveRTDataF romNYISO.Servic eReference.eDat aFeedSoapClient ..ctor() in C:
\Users\localhos t\Documents\Vis ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\R
etrieveRTDataFr omNYISO\Service References\Serv iceReference\Re ference.cs:line 154
5
at RetrieveRTDataF romNYISO.Progra m.Main() in C:\Users\localh ost\Documents\V is
ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retriev eRTDataFromNYIS O\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.ClientCr edentials.UserN ame.UserName = "tellme";
client.ClientCr edentials.UserN ame.Password = "tellme";
nl = client.getCustI nfo();
int i = 0;
while (i <= (nl.Length - 1))
{
Console.WriteLi ne(nl[i].name + " " + nl[i].address);
i++;
}
ERROR which I am getting, is this:
System.Configur ation.Configura tionErrorsExcep tion: The value of the property 'cl
ientCredentialT ype' 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\Do cuments\Visual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retri
eveRTDataFromNY ISO\bin\Debug\R etrieveRTDataFr omNYISO.exe.Con fig line 28)
at System.Configur ation.BaseConfi gurationRecord. EvaluateOne(Str ing[] keys, Se
ctionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord
sectionRecord, Object parentResult)
at System.Configur ation.BaseConfi gurationRecord. Evaluate(Factor yRecord factor
yRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boole
an getRuntimeObjec t, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSectionRecur sive(String co
nfigKey, Boolean getLkg, Boolean checkPermission , Boolean getRuntimeObjec t, Bool
ean requestIsHere, Object& result, Object& resultRuntimeOb ject)
at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey,
Boolean getLkg, Boolean checkPermission )
at System.Configur ation.BaseConfi gurationRecord. GetSection(Stri ng configKey)
at System.Configur ation.ClientCon figurationSyste m.System.Config uration.Intern
al.IInternalCon figSystem.GetSe ction(String sectionName)
at System.Configur ation.Configura tionManager.Get Section(String sectionName)
at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetSectionFro
mConfigurationM anager(String sectionPath)
at System.ServiceM odel.Configurat ion.Configurati onHelpers.Unsaf eGetAssociated
Section(Context Information evalContext, String sectionPath)
at System.ServiceM odel.Configurat ion.ClientSecti on.UnsafeGetSec tion()
at System.ServiceM odel.Descriptio n.ConfigLoader. LookupChannel(S tring configur
ationName, String contractName, Boolean wildcard)
at System.ServiceM odel.Descriptio n.ConfigLoader. LoadChannelBeha viors(ServiceE
ndpoint serviceEndpoint , String configurationNa me)
at System.ServiceM odel.ChannelFac tory.ApplyConfi guration(String configuration
Name)
at System.ServiceM odel.ChannelFac tory.Initialize Endpoint(String configuration
Name, EndpointAddress address)
at System.ServiceM odel.ChannelFac tory`1..ctor(St ring endpointConfigu rationNam
e, EndpointAddress remoteAddress)
at System.ServiceM odel.EndpointTr ait`1.CreateSim plexFactory()
at System.ServiceM odel.EndpointTr ait`1.CreateCha nnelFactory()
at System.ServiceM odel.ClientBase `1.CreateChanne lFactoryRef(End pointTrait`1 e
ndpointTrait)
at System.ServiceM odel.ClientBase `1.InitializeCh annelFactoryRef ()
at System.ServiceM odel.ClientBase `1..ctor()
at RetrieveRTDataF romNYISO.Servic eReference.eDat aFeedSoapClient ..ctor() in C:
\Users\localhos t\Documents\Vis ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\R
etrieveRTDataFr omNYISO\Service References\Serv iceReference\Re ference.cs:line 154
5
at RetrieveRTDataF romNYISO.Progra m.Main() in C:\Users\localh ost\Documents\V is
ual Studio 2008\Projects\R etrieveRTDataFr omNYISO\Retriev eRTDataFromNYIS O\Program
..cs:line 26
can you tell me how to fix this problem? According to me, it is not accepting the username and password.
Comment