473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

IFrame and credentials

Hi

How do I (in code) provide credentials in the form of user/pwd to a
webapplication I expect to host inside an IFrame tag.
From a scan of the properties of an Iframe, I do only see the src attribute
allowing my to set the source...

Thanks in advance!
--
rgds.
/Claus Konrad
Oct 23 '06 #1
2 3878
there aren't any. if its a really old web site you can pass the login in the
url., but not recommended. if your the same domain, you can use a cookie.
you could also pass a ticket on the url.

-- bruce (sqlwork.com)
"Claus Konrad" <Cl*********@discussions.microsoft.comwrote in message
news:83**********************************@microsof t.com...
Hi

How do I (in code) provide credentials in the form of user/pwd to a
webapplication I expect to host inside an IFrame tag.
From a scan of the properties of an Iframe, I do only see the src
attribute
allowing my to set the source...

Thanks in advance!
--
rgds.
/Claus Konrad

Oct 23 '06 #2
Thanks.

I am thinking whether I can perform an "artificial" logon before setting the
scr?
This way I should obtain a valid logon session with the remote server
(ASP.NET App). before setting the url of the IFrame?

Something like this:

//perform a logon to the image server
string url =
ConfigurationManager.AppSettings[WebHelper.RemoteServerParameters.IMAGE_APPROVAL_KE Y];
string usr =
ConfigurationManager.AppSettings[WebHelper.RemoteServerParameters.IMAGE_SERVER_USR_ KEY];
string pwd =
ConfigurationManager.AppSettings[WebHelper.RemoteServerParameters.IMAGE_SERVER_PWD_ KEY];

WebRequest req = WebRequest.Create(url);
req.Credentials = new NetworkCredential(usr, pwd);
WebResponse resp = req.GetResponse();

this.frmImageApproval.Attributes["src"] =
req.RequestUri.AbsoluteUri;
--
rgds.
/Claus Konrad
"bruce barker (sqlwork.com)" wrote:
there aren't any. if its a really old web site you can pass the login in the
url., but not recommended. if your the same domain, you can use a cookie.
you could also pass a ticket on the url.

-- bruce (sqlwork.com)
"Claus Konrad" <Cl*********@discussions.microsoft.comwrote in message
news:83**********************************@microsof t.com...
Hi

How do I (in code) provide credentials in the form of user/pwd to a
webapplication I expect to host inside an IFrame tag.
From a scan of the properties of an Iframe, I do only see the src
attribute
allowing my to set the source...

Thanks in advance!
--
rgds.
/Claus Konrad


Oct 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
2
by: starman7 | last post by:
i have an app i need to login to that requires several credentials, instead of typing them (or having the browser remember some of them), i call the login page in an iframe, which itself is in...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
2
by: TheBurgerMan | last post by:
Hi all. I need to attach NetworkCredentials to a WebRequest and display the resulting web page in an IFRAME (aspx). I have validated that I can get the page (using the NetworkCredentials), but...
0
by: Fariba | last post by:
(This is about a site in our interanet) I have an aspx page which has a iframe on it. I would like my page to be called by get paramters passing into it a paramter called url and I dynamically...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
9
by: jad2006 | last post by:
Hi guys We have a requirement like in one iframe we have to show one site and in another iframe we have to show some other external site, we did it using <iframe src="http://www.a.com">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.