Invalid Characters in ASP.NET ??

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

Hello,

I have made a web site that streams music using mms. The service works
great but I have noticed that when the song or song location has an
apostaphie in it the server (or something) cuts everything off after the
apostaphie and causes the song not to stream. i.e.:

mms:\My Music\Greatest Songs\She's Mine.wma is read as mms:\My
Music\Greatest
Songs\She

It does the same when the directory has an apostaphie in it. Is there a
work around for this? Any suggestions or information would be greatly
appreciated.

Thanks,

Chuck
 
urlencode()
htmlencode()
putting quotes around it
escaping the apostrophy


Try those ideas
 
Hello,
Thank You for your response.

I tried the following and it still gave the same results as the original
problem.

Dim AString as String = ("mms:\My Music\Greatest Songs\She's Mine.wma")

Then I send the AString to the Media Player.

I also tried the following and the Media Player did not recognize the file:

Dim AString as String = "(mms:\My Music\Greatest Songs\She's Mine.wma" & ")"

Thanks,
Chuck
 
1) \ should be /
2) did you try the urlencode?
3) what does the querystring look like for the link? Try typing it directly
into the address bar. It's not an ASP.NET issue, it's a bad querystring
issue

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
 
Hello, :)

The actual code is:

This one does not work:

Dim AString as String = "mms://MyStaticIP\Music\Production\Sound-Alikes\14
Don't Confuse Me\VU PM Mzk Dance For Keeps Default.mp3"

This one does work:

Dim AString as String = "mms://MyStaticIP\Music\Production\Sound-Alikes\15
She Drives Me Crazy\VU PM Mzk She Drives Me Crazy Default.mp3"

I am not sure how to use "urlencode" that you are referring to.


***** Not Sure How To Implement This *****

Dim AnEncoder as System.Text.Encoder

Dim AnArray as Byte = AString

AnEncoder.GetBytes(AnArray)

I take it you Encode The Url and Then UnEncode It on the server?
I can show you the site, but it is not a public site. All the Downloading
and Listening functions work if they do not have "'".

Thanks,

Chuck
 
Hello Again,
Whoops, I forgot to tell you that it did not work when I pasted it into my
brower. I cut of everything after the apostaphie.

Chuck
 
try
Dim AString as String = "mms://MyStaticIP/" +
URLEncode("Music/Production/Sound-Alikes/14
Don't Confuse Me/VU PM Mzk Dance For Keeps Default.mp3")

two things there. 1) use / not \ and 2) used the URLEncode()


--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
 
Hello,

Received the following error (underline squiggley)

URLEncode is not Declared.

It appears to me that that method is for Framework 1.1 or above. I am using
Framework 1.0

Thanks,

Chuck
 
Hello Again :)

When i paste the url into a browser with the "'" it works now, because I
changed the "\" to "/" but still cuts everything off after the "'" in the
web site.
Thanks
Chuck
 
Hello Again :)

Thank you for your help you have been a great help. I have been able to
uncover the real problem with you assistance. Even with the encoding, ie
:Server.UrlEncode and Server.UrlPathEncode I still get the same problem. I
have tracked everything to the Media Player.

This is the code I am using to place and fill the Media Player on the Page.
It seems that when the url is placed in the Media Player that it cuts off
the "'". Could this be what is happening?

This is the code for the player.

TheURL is the Url,
Dim ctlMediaPlayer As New LiteralControl("<OBJECT ID='MediaPlayer'
style='Z-INDEX: 117; LEFT: 14px; WIDTH: 127px; POSITION: absolute; TOP:
82px; HEIGHT: 110px' classid=clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6
VIEWASTEXT> <PARAM NAME=Name VALUE='WMP1'> <PARAM NAME=URL VALUE= '" &
TheURL & "'> <PARAM NAME='AutoSize' VALUE='1'></OBJECT>")

Me.Controls.Add(ctlMediaPlayer)

Thanks

Chuck
 
Thank You,
I Got It To Work,
Thank You, Thank You. You were a great help

I removed the "'" around the URL and Server.UrlPathEncode and that made it
work. Thanks, Thanks, Thanks :)

Have a Great Day !!

Chuck
 
Back
Top