Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a media player and a setup for it. When I try to play a song, I get an error "Illegel characters in path mscorlib" and the song doesn't play. What does it mean? How can I solve it?
Posted
Updated 22-Apr-11 6:11am
v2
Comments
Tarakeshwar Reddy 22-Apr-11 12:11pm    
Rewrote the question
Tarakeshwar Reddy 22-Apr-11 12:13pm    
Can you add the part of your code which is throwing that error? It would be helpful for anyone trying to answer your question.

Could it be as simple as having invalid characters in the path to the song you are trying to play? Most of the invalid characters are symbols, but some are a little more common like a ", <, > and |. My money's on the ".

To view the invalid characters you can use System.IO.Path.GetInvalidPathChars(), then compare those characters to the path to the file you're trying to play.

You might also check System.IO.Path.GetInvalidFileNameChars()
 
Share this answer
 
Comments
Abhinav S 22-Apr-11 13:40pm    
Good guess. 5.
This thread[^] may provide additional information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900