|
-
May 28th, 2007, 11:26 AM
#1
Access Cookie
Hi,
I have 2 web application hosted on 2 separate servers.In first application i had one anchor tag whose target=_None and href="url of 2nd application"
Is it possible to access the cookie which is created by first application in second application ? if yes how?
Any help on this.........
Regards,
Ritesh
Last edited by riteshjain1982; May 28th, 2007 at 11:33 AM.
-
May 28th, 2007, 09:54 PM
#2
Hyperactive Member
Re: Access Cookie
no, cookies are on a per site basis.
you could pass the cookie parameters in the address http://myapp.net/?var1=red?var2=blue
or something along those lines. If there is security concerns just encrypt variables.
The other option is to a db driven application and just have both you apps pull from a the db.
-
May 29th, 2007, 09:10 AM
#3
Re: Access Cookie
Thanks for reply............ but as i mentioned for some reason i have to use anchor tag to redirect the url and in that i can not pass the parameter using
href=http://abc.com?a=document.cookie ......
i am wondering when browser open the new window for redirected URL is the case of parent - child form and if so can't i access the cookie information of calling page (parent)
Regards,
Ritesh
-
May 29th, 2007, 05:08 PM
#4
Hyperactive Member
Re: Access Cookie
 Originally Posted by riteshjain1982
Thanks for reply............ but as i mentioned for some reason i have to use anchor tag to redirect the url and in that i can not pass the parameter using
href=http://abc.com?a=document.cookie ......
i am wondering when browser open the new window for redirected URL is the case of parent - child form and if so can't i access the cookie information of calling page (parent)
Regards,
Ritesh
....so pass your params using an anchor tag.
Code:
<a id="myID" href="javascript:openNewWinFunction()">Text to be displayed</a>
why do you have to use anchor tags? You could do it with asp.net as well.
You posting in an asp.net forum, so I am assuming you ca populate the page dynamically.
Code:
<asp:HyperLink id="value" Runat="Server"
ImageUrl="url"
NavigateUrl="url"
Target="_blank|_self|_top|_parent|framename"
Text="string"
property="value"
Style="CSS style settings..."
/>
Last edited by superbovine; May 29th, 2007 at 05:11 PM.
-
May 30th, 2007, 10:47 AM
#5
Re: Access Cookie
You have to pass some information to the other website. It's either that, or have the other website work on another port under the same domain name.
Example:
www.abc.com
and
www.abc.com:82
That way, both apps can look at the same cookie.
Otherwise, store it in a database. When redirecting, pass it an ID which the other app can use to query the same database and create a cookie.
-
May 31st, 2007, 04:52 PM
#6
Re: Access Cookie
thanks superbovine and Mendhak for your suggestion.....but unfortunately i dont have much control rather no direct control over 1st web application (not even to write any jscript on that) except the fact that i can only place one Anchor tab........... i tried using href = http://abc.com?a=document.cookie; as well as tried to see all possible propert of request object in target page (child page) but no luck...........
any other clue will be help full
PS:Its sort of advertisement link on 1st web app when user click on it will redirect it to other page,and 1st web app stored users color schema and other settings in cookie but i know the key in which those values are stored.....
-
Jun 1st, 2007, 08:33 AM
#7
Re: Access Cookie
Mendhak answered your question precisely. You have one anchor tag to place, so add a parameter in that redirect for the second application to work from. Look at the URL's when navigating the forums. The root always stays the same, but the content is constantly changing, because it's being passed different variables. You can do the same thing for your project. Make your anchor tag something like <a href="http://www.secondApp.com?var=42">Click Here</a>, and in www.secondApp.com, just tell the page how to handle the query string. It's not that difficult.
-
Jun 1st, 2007, 01:06 PM
#8
Re: Access Cookie
Hi Timeshifter.. thankx for reply.........but here the things is that both application are running under different domain name on diff servers........ and parent app where my anchor tag is, has no other info abt. target app other than url reside in href......and some how my anchor tag is suppose to capture cookie of parent and sent it to target may be in the form of parameter or ????........i hope u will get what i want to convey.....
-
Jun 1st, 2007, 01:13 PM
#9
Re: Access Cookie
Not really.. but it still sounds like you just need to pass information from one page to another. What server it's on doesn't matter, as long as the recieving end knows what to do with it. Query strings are how that's done.
-
Jun 1st, 2007, 05:59 PM
#10
Re: Access Cookie
ok let's take for example i posted some link in this thread which will take user to this site http://www.mysite.com so i want to access the cookie value of this site (vbforum) which store user color scheme and other info, in my site.........i hope this will be clear my point.........
-
Jun 1st, 2007, 07:20 PM
#11
Hyperactive Member
Re: Access Cookie
 Originally Posted by riteshjain1982
ok let's take for example i posted some link in this thread which will take user to this site http://www.mysite.com so i want to access the cookie value of this site (vbforum) which store user color scheme and other info, in my site.........i hope this will be clear my point.........
That isn't possible. There is no way around this.
-
Jun 4th, 2007, 03:24 PM
#12
Re: Access Cookie
You're stuck. You will need more access to the first application than just being able to place a hyperlink on it. Or get the developers of the first application to generate the links for you. No other way.
-
Jun 5th, 2007, 12:53 PM
#13
Re: Access Cookie
Thanks guys for u r input...........it seems like mission impossible ....
while googling i came to know that what i want is something related to hacking and all stuff.....so i guess have to find some other way..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|