Hi Pankaj,
Have you created trusted system connection between portal and ecc system and SSO configured?
It generally happens when SSO is not configured. And if trust is established using LogonTicket type, make sure user name is same in portal and ecc. And always use FQDN for portal.
Best regards,
Prem