How do I create cookies in ASP.NET and read in PHP

Posted on 2009-04-17
Last Modified: 2013-12-12
This might be a really silly question;

I want to create a cookie in an ASP.NET app, and then read the same cookie in a php script, before I waste an hour attempting to do it, is it possible, and  would it simply be a case of creating a cookie within the same domain?
Question by:eivo
    LVL 5

    Accepted Solution

    Yes, cookies are program independent. they can be read by any application as long as it's the same domain.  So you can create one in ASP.NET and then read it in PHP.

    however, some browsers won't allow third-party domains to be set. i.e. if you're on and you want to set a cookie for some browsers don't allow that, it is a user preference setting.

    Now, if you're doing something like and reading it on then you simply have to set the cookie to (with the leading period) and it will read on both.
    LVL 4

    Author Closing Comment

    Terrific, I had thought as much, just wanted to check.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now