How would I go about being able to use a URI of a binary class.
For example, I need to be able to give the URI for a song, but the song comes for a SQL server which sends it in a binary form, which is on the memory.

Thanks so much for any help.

Yes, under SilverLight, I have A MediaElement

<MediaElement source = "The memory"/>

OK, I just asked you because I expected you need just to play a song from your application without interacting with Media Player or if you need to play a song file without any information about the software user uses.

So, to convert any file to its binary representative

System.IO.FileStream fs = new System.IO.FileStream(@"FilePath", System.IO.FileMode.Open);
byte[] fileAsBytes = new byte[fs.Length];
fs.Read(fileAsBytes, 0, fileAsBytes.Length);

To convert it back to stream

System.IO.StreamReader sr =  new System.IO.StreamReader(new System.IO.MemoryStream(fileAsBytes));

I kinda see what you are getting at. The issue is that I have:
MediaElement.Source = (a URI)

That is what I can't think of is how to pass basically a class (on memory value), as a file path.
Thanks for the help thus far.

Yes, but now I am wondering if I did something wrong. I have a SQL server which sends it as binary. The issue is when I have the data I never have the file location. I just have the binary value it returned.

For example:
I query the server for a song.
It returns the song as binary.
I set the source of the media element to the value returned.

That thirds step is my issue.
Thanks for the help.

So this has nothing to do with files? You have a song stored as binary in the SQL Server and want to use MediaPlayer to play the song, but media player is asking for a URI and you only have a memory buffer?

Write out a temporary file..

You have SQL Blob storage, effectively the same thing:

I also gave the solution!!! Back to 2nd reply!

Thanks for your help, with what you gave me it was able to complete the MediaPlayer.