I have a console application (from a Sample) working perfectly to get Project and Task information. I now need to move it to my ASP.Net Application. I added the app.config settings to my web.config and it is picking up the information ok.
But when I instantiate my Project DataSet:
'Get Project Info from Project ServerDim projectDs As SvcProject.ProjectDataSet = projectClient.ReadProjectStatus(Guid.Empty, _
SvcProject.DataStoreEnum.WorkingStore, DataRS("ProjectNumber"), _
CInt(PSLibrary.Project.ProjectType.Project))
I get the following error:
The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.
My Web.Config:
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="basicHttpBehavior">
<clientCredentials>
<windows allowedImpersonationLevel="Impersonation" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="basicHttpConf" sendTimeout="01:00:00" maxBufferPoolSize="500000000"
maxReceivedMessageSize="500000000">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="500000000" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" realm="http" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://myServer:22986/pwa/_vti_bin/PSI/ProjectServer.svc"
behaviorConfiguration="basicHttpBehavior" binding="basicHttpBinding"
bindingConfiguration="basicHttpConf" contract="SvcProject.Project"
name="basicHttp_Project" />
<endpoint address="http://myServer:22986/pwa/_vti_bin/PSI/ProjectServer.svc"
behaviorConfiguration="basicHttpBehavior" binding="basicHttpBinding"
bindingConfiguration="basicHttpConf" contract="SvcResource.Resource"
name="basicHttp_Resource" />
<endpoint address="http://myServer:22986/pwa/_vti_bin/PSI/ProjectServer.svc"
behaviorConfiguration="basicHttpBehavior" binding="basicHttpBinding"
bindingConfiguration="basicHttpConf" contract="SvcQueueSystem.QueueSystem"
name="basicHttp_QueueSystem" />
</client>
</system.serviceModel>
Todd Klost