curiouswebster
asked on
Having the Uri object parse out all unique domains
Using the Uri object to return a list of domain found in the string
I need to find if Uri (or related .NET object) can return 2 of 3 domains when it parses this string:
https://sso.mydomain.org/openam/?goto=http://evildomain.com/?hacked=mydomain.org:80/ntshome/Home/Index?ClientId=MP";
I would be okay if it returned:
sso.mydomain.org
evildomain.com
mydomain.org:
OR
evildomain.com
mydomain.org
How can I do this with Uri or some other .NET object?
Thanks
I need to find if Uri (or related .NET object) can return 2 of 3 domains when it parses this string:
https://sso.mydomain.org/openam/?goto=http://evildomain.com/?hacked=mydomain.org:80/ntshome/Home/Index?ClientId=MP";
I would be okay if it returned:
sso.mydomain.org
evildomain.com
mydomain.org:
OR
evildomain.com
mydomain.org
How can I do this with Uri or some other .NET object?
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you very much
ASKER
sso.mydomain.org/openam/
evildomain.com
mydomain.org
and your code does not even create that list.
Is there an easier way? One with code I could modify myself?
I do not code LINQ with SQL commands, so it is especially confusing to me.
Thanks.