Page viewer webpart won’t take login parameters

sharepointweb-partswebpage

I need to show an external site through our sharepoint portal and have added a Page viewer web part. The problem is that the address includes a login and password used to autologin to the external site but Sharepoint only shows the login page on click.

If I click the "Test link" in the web part properties it opens as it should but in a different window and not in the sharepoint frame.

The adress has the format http://www.site.com/companyname/Login.aspx?style=companyname&lang=en&l=login&p=password

How can I get the autologin to work in the frame used on my webparts page?

Any help very appreciated.

With regards
Marcus L

Best Answer

Assuming you are using Internet Explorer, the problem is with IE's security policies.

The Page Viewer Web Part is basic and pretty much just inserts an IFRAME tag into the page with the URL you have supplied. This displays your external site in a child frame.

By default, child frames cannot store cookies for use by the parent. The URL you are passing through to the external site contains the username and password which is fine, however the site needs to store a cookie so it knows you have logged in as you browse other pages within it. As it can't store the cookie, the child site assumes you have not logged in.

You could test this by adding the external site to your Trusted Sites list in IE and set the Trusted Site security to Low. Then it should be able to store the cookies it needs. Alternatively if you have control over the external site, this KB article may help you.