473,385 Members | 1,867 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,385 software developers and data experts.

authenticating from ASP.NET to PHP !!

Hi All,

Ok, I know that the title of this question might seem strange... but i
need to be able to authenticate from a .NET website (which a user would
be logged on) to a PHP website (with the same user details).

Does anyone know if there is a way to do this? I think the only way is
to use an encrypted URL... but how would I encrypt the URL from the
ASP.NET app into a format that the PHP app can decrypt?

would a cookie also work? can you use cookies between
applications/sites?

Please help. :o(

Oct 22 '06 #1
4 2217
eml
Hello.

I'm not quite sure how to solve the issue. I think I'd (since my
knowledge is so limited) would send an id in the URL and have the
PHP-site check this against a database, and remove it at the same time
so people can't fake anything.

And yes, a cookie would work, but it'd be quite easy to fake a cookie
wouldn't it? ;-)

On Oct 22, 7:08 am, "SuperRobot5000" <vimal.na...@gmail.comwrote:
Hi All,

Ok, I know that the title of this question might seem strange... but i
need to be able to authenticate from a .NET website (which a user would
be logged on) to a PHP website (with the same user details).

Does anyone know if there is a way to do this? I think the only way is
to use an encrypted URL... but how would I encrypt the URL from the
ASP.NET app into a format that the PHP app can decrypt?

would a cookie also work? can you use cookies between
applications/sites?

Please help. :o(
Oct 22 '06 #2
SuperRobot5000 wrote:
Hi All,

Ok, I know that the title of this question might seem strange... but i
need to be able to authenticate from a .NET website (which a user would
be logged on) to a PHP website (with the same user details).

Does anyone know if there is a way to do this? I think the only way is
to use an encrypted URL... but how would I encrypt the URL from the
ASP.NET app into a format that the PHP app can decrypt?

would a cookie also work? can you use cookies between
applications/sites?

Please help. :o(
Cookies don't work cross-domain - to allow them to do so would be a huge
security risk.

It really doesn't make a lot of difference what languages the sites are
written in - your .asp site will only "see" the html output (and
vice-versa, if necessary).

One way would be to encrypt the userid and password and have it passed
to a special login page (assuming you have control of the other site) as
GET parameters. When I need encryption (as opposed to hashing which is
not reversible), either use the libmcrypt routines or my own. This
isn't real secure, though, unless you use ssl. And it doesn't work if
you use the authentication provided by the webserver (as opposed to
programmer authentication).

But any other way is not easy. You can't do the authentication for the
browser, and you can't instruct the browser to do the authentication on
the new site for you. This means you would have to proxy the second
site in the first, and handle the authentication in your .NET code. And
how it's done would be dependent on how the authentication is done on
the remote site.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 22 '06 #3
Thanks for the advice guys.

The only issue with encrypting a the URL is that I'll need routines in
both systems that match, but I dont know PHP well enough to be able to
do this. :o(

I have made the 2 systems on the same domain now, so cookies are an
option. Can anyone give any tips on how I might achieve this between
the ASP.NET and PHP apps?

SR5k

Jerry Stuckle wrote:
SuperRobot5000 wrote:
Hi All,

Ok, I know that the title of this question might seem strange... but i
need to be able to authenticate from a .NET website (which a user would
be logged on) to a PHP website (with the same user details).

Does anyone know if there is a way to do this? I think the only way is
to use an encrypted URL... but how would I encrypt the URL from the
ASP.NET app into a format that the PHP app can decrypt?

would a cookie also work? can you use cookies between
applications/sites?

Please help. :o(

Cookies don't work cross-domain - to allow them to do so would be a huge
security risk.

It really doesn't make a lot of difference what languages the sites are
written in - your .asp site will only "see" the html output (and
vice-versa, if necessary).

One way would be to encrypt the userid and password and have it passed
to a special login page (assuming you have control of the other site) as
GET parameters. When I need encryption (as opposed to hashing which is
not reversible), either use the libmcrypt routines or my own. This
isn't real secure, though, unless you use ssl. And it doesn't work if
you use the authentication provided by the webserver (as opposed to
programmer authentication).

But any other way is not easy. You can't do the authentication for the
browser, and you can't instruct the browser to do the authentication on
the new site for you. This means you would have to proxy the second
site in the first, and handle the authentication in your .NET code. And
how it's done would be dependent on how the authentication is done on
the remote site.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 23 '06 #4
SuperRobot5000 wrote:
Jerry Stuckle wrote:
>>SuperRobot5000 wrote:
>>>Hi All,

Ok, I know that the title of this question might seem strange... but i
need to be able to authenticate from a .NET website (which a user would
be logged on) to a PHP website (with the same user details).

Does anyone know if there is a way to do this? I think the only way is
to use an encrypted URL... but how would I encrypt the URL from the
ASP.NET app into a format that the PHP app can decrypt?

would a cookie also work? can you use cookies between
applications/sites?

Please help. :o(

Cookies don't work cross-domain - to allow them to do so would be a huge
security risk.

It really doesn't make a lot of difference what languages the sites are
written in - your .asp site will only "see" the html output (and
vice-versa, if necessary).

One way would be to encrypt the userid and password and have it passed
to a special login page (assuming you have control of the other site) as
GET parameters. When I need encryption (as opposed to hashing which is
not reversible), either use the libmcrypt routines or my own. This
isn't real secure, though, unless you use ssl. And it doesn't work if
you use the authentication provided by the webserver (as opposed to
programmer authentication).

But any other way is not easy. You can't do the authentication for the
browser, and you can't instruct the browser to do the authentication on
the new site for you. This means you would have to proxy the second
site in the first, and handle the authentication in your .NET code. And
how it's done would be dependent on how the authentication is done on
the remote site.
Thanks for the advice guys.

The only issue with encrypting a the URL is that I'll need routines in
both systems that match, but I don t know PHP well enough to be able to
do this. :o(

I have made the 2 systems on the same domain now, so cookies are an
option. Can anyone give any tips on how I might achieve this between
the ASP.NET and PHP apps?

SR5k
(Top posting fixed).

Shouldn't be too hard. Just set the cookie in one app and read it in
the other. As long as you're just storing character (no binary) data in
it, it should work fine.

You won't be able to share session information, though. If you need to
store something sensitive (i.e. userid), you might think about creating
a pseudo-session in a database and store you data there. store a (long)
key to the row in a cookie. It will emulate a session - but be readable
by both.

Of course, every once in a while you'll want to delete old rows.

P.S. Please don't top post. Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 24 '06 #5

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

Similar topics

6
by: Smitro | last post by:
Hi, I'm looking for a Tutorial about Authenticating using PHP and Linux User Accounts. Can some one point me in the right direction? Smitro
9
by: Sophia | last post by:
I need to authenticate users to enter in a NTLM-protected virtual directory, but I can't pop up a NT-login dialogue box - I can only do a web-based username/password form (my client is a...
0
by: Ram | last post by:
Hi All How to use C# for Authenticating a NDS server using LDAP. please give me a solution ASAP Thanks, Ram
2
by: listname | last post by:
A SharePoint portal is running at http://sitename/. When I visit that web site, a dialog box comes up asking for network domain/userid/password. I provide the details and the site lets me in....
3
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 ...
4
by: Greg Burns | last post by:
I have built a web app that uses forms authentication. There isn't a "remember me" feature (i.e. the authentication cookie is not permanent). When you close the browser, and open a new one, you...
1
by: mirlisa | last post by:
We have an odd problem. Sometime this morning our classic asp web application stopped authenticating against active directory. This is our only "classic" asp app that authenticates against ad....
1
by: spelunka | last post by:
Hello, does anyone know why one would lose their styles after successfully authenticating against forms auth? I'm using asp.net 2.0 and the page that is being redirected to after authenticating is...
0
by: Nandagopal | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and C#": But I am having a problem figuring out the LDAP:// The LDAP:// that I pass looks...
5
by: Manikrag | last post by:
Hi Team, I have copied one ASP.NET application on a new server and configured it all.Now I am getting below error when I am trying to authenticate users thru LdapAuthentication function. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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,...

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.