1

I am hosting sample application on IIS server. But when i hit the URL from my local browser , getting error. My IDP is working fine on localhost but not working on IIS server.

1st : do i need to have internet connection on windows server which host my sample app 2nd : when i run idp url on windows server, it does not work as no internet connection

Please help me to understand.

System.Net.WebException: No such host is known. No such host is known.
System.Net.Http.HttpRequestException: No such host is known.
System.Net.Sockets.SocketException (11001): No such host is known.
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken 
cancellationToken)
End of inner exception stack trace ---

at System.Net.HttpWebRequest.GetResponse()
at System.Net.WebClient.GetWebResponse(WebRequest request)
at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadString(Uri address)
at ITfoxtec.Identity.Saml2.Schemas.Metadata.EntityDescriptor.ReadIdPSsoDescriptorFromUrl(Uri 
idPMetadataUrl)
Peter Pan
  • 23,476
  • 4
  • 25
  • 43
Girish G
  • 93
  • 7

1 Answers1

1

I think this error was a failure in DNS name resolution. The application was trying to call an API but it is not able to find the hostname.

Your server should be able to access to the DNS server. Additionally, your DNS server should be able to lookup the hostname that is in your code. Troubleshooting steps: Run ipconfig /all in Command Prompt. Fin the IP addresses of the DNS server in the output. Try to ping it.

samwu
  • 3,857
  • 3
  • 11
  • 25
  • 1
    Ok, tried this. Got the dns and i am able to ping the ips. So this application trying to call IDP server using webclient method. Code is in starup.cs. I am using SAML authentication using itfoxtec library – Girish G Apr 23 '21 at 10:21
  • Access Denied (authentication_failed) ... Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified. This is the error when i try to use webClient.DownloadString(idPMetadataUrl) method. My application is hosted on IIS server and i dont know what is correct proxy for that. When i use this application on localhost/iis expree, i use local system proxy i.e. 127.0.0.0 / port no and then its working but how its going to work on IIS ? – Girish G Apr 24 '21 at 17:55
  • Can you provide a detailed screenshot of your error? – samwu Apr 26 '21 at 09:38