473,807 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invalid Characters in ASP.NET ??

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


Nov 18 '05
12 1286
my bad
use Server.URLEncod e() instead of just URLEncode()
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:u9******** ******@tk2msftn gp13.phx.gbl...
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

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
try
Dim AString as String = "mms://MyStaticIP/" +
URLEncode("Musi c/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
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:uQ******** ******@TK2MSFTN GP09.phx.gbl...
Hello, :)

The actual code is:

This one does not work:

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

This one does work:

Dim AString as String = "mms://MyStaticIP\Musi c\Production\So und-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.Enc oder

Dim AnArray as Byte = AString

AnEncoder.GetBy tes(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

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:us******** *****@TK2MSFTNG P12.phx.gbl...
> 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
>
>
> "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> news:u%******** ********@TK2MSF TNGP11.phx.gbl. ..
> > 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
> >
> > "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
> > news:OD******** ******@tk2msftn gp13.phx.gbl...
> > > urlencode()
> > > htmlencode()
> > > putting quotes around it
> > > escaping the apostrophy
> > >
> > >
> > > Try those ideas
> > >
> > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > www.Darkfalz.com
> > >
> > >
> > > "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> > > news:OM******** ******@TK2MSFTN GP12.phx.gbl...
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #11
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.UrlEnco de and Server.UrlPathE ncode 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:6 BF52A52-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

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
my bad
use Server.URLEncod e() instead of just URLEncode()
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:u9******** ******@tk2msftn gp13.phx.gbl...
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

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
try
Dim AString as String = "mms://MyStaticIP/" +
URLEncode("Musi c/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
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:uQ******** ******@TK2MSFTN GP09.phx.gbl...
> Hello, :)
>
> The actual code is:
>
> This one does not work:
>
> Dim AString as String =

"mms://MyStaticIP\Musi c\Production\So und-Alikes\14
> Don't Confuse Me\VU PM Mzk Dance For Keeps Default.mp3"
>
> This one does work:
>
> Dim AString as String =

"mms://MyStaticIP\Musi c\Production\So und-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.Enc oder
>
> Dim AnArray as Byte = AString
>
> AnEncoder.GetBy tes(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
>
> "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
> news:us******** *****@TK2MSFTNG P12.phx.gbl...
> > 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
> >
> >
> > "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> > news:u%******** ********@TK2MSF TNGP11.phx.gbl. ..
> > > 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
> > >
> > > "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
> > > news:OD******** ******@tk2msftn gp13.phx.gbl...
> > > > urlencode()
> > > > htmlencode()
> > > > putting quotes around it
> > > > escaping the apostrophy
> > > >
> > > >
> > > > Try those ideas
> > > >
> > > > --
> > > > Curt Christianson
> > > > Owner/Lead Developer, DF-Software
> > > > www.Darkfalz.com
> > > >
> > > >
> > > > "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> > > > news:OM******** ******@TK2MSFTN GP12.phx.gbl...
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #12
Thank You,
I Got It To Work,
Thank You, Thank You. You were a great help

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

Have a Great Day !!

Chuck

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
my bad
use Server.URLEncod e() instead of just URLEncode()
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:u9******** ******@tk2msftn gp13.phx.gbl...
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

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
try
Dim AString as String = "mms://MyStaticIP/" +
URLEncode("Musi c/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
"Charles A. Lackman" <Ch*****@cet.co m> wrote in message
news:uQ******** ******@TK2MSFTN GP09.phx.gbl...
> Hello, :)
>
> The actual code is:
>
> This one does not work:
>
> Dim AString as String =

"mms://MyStaticIP\Musi c\Production\So und-Alikes\14
> Don't Confuse Me\VU PM Mzk Dance For Keeps Default.mp3"
>
> This one does work:
>
> Dim AString as String =

"mms://MyStaticIP\Musi c\Production\So und-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.Enc oder
>
> Dim AnArray as Byte = AString
>
> AnEncoder.GetBy tes(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
>
> "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
> news:us******** *****@TK2MSFTNG P12.phx.gbl...
> > 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
> >
> >
> > "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> > news:u%******** ********@TK2MSF TNGP11.phx.gbl. ..
> > > 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
> > >
> > > "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
> > > news:OD******** ******@tk2msftn gp13.phx.gbl...
> > > > urlencode()
> > > > htmlencode()
> > > > putting quotes around it
> > > > escaping the apostrophy
> > > >
> > > >
> > > > Try those ideas
> > > >
> > > > --
> > > > Curt Christianson
> > > > Owner/Lead Developer, DF-Software
> > > > www.Darkfalz.com
> > > >
> > > >
> > > > "Charles A. Lackman" <Ch*****@cet.co m> wrote in message
> > > > news:OM******** ******@TK2MSFTN GP12.phx.gbl...
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8163
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones like Microsoft's 'smartquotes'), and outputs the file. The problem is these files will be on disk, so the program won't have the character encoding information from the server. Questions:
2
2910
by: Xam | last post by:
Hello everybody Do you know of a javascript routine that can warn if there are any pre-defined invalid chars in the filename of an INPUT file box before it is submitted with the submit button. The process would be: a) User clicks the INPUT File's Browse button to select the file from their computer.
0
1850
by: Felix Natter | last post by:
hello, I am getting this error with php 4.4.0 (cgi mode), apache 1.3.26 on debian woody: PHP Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/m2004018/DOMAIN.de/shop1/includes/application_top.php on line 270 PHP Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on
1
3556
by: Chief | last post by:
I am unable to load an xml document that contains Chinese characters in an attribute value. I need to load the document into and XmlDocument object and am using the XmlDocument.Load(string filename) method. I get an error that says the document contains invalid characters. The document loads fine with Chinese characters in a node value, but not in an attribute value. I have tried setting the encoding to UTF-8 and UTF-16, but neither solve...
7
3603
by: RobertoP | last post by:
Hello all, I am trying to create an simple application that communicates with an Oracle DB, but the data returned by the OracleDataReader object contains random invalid characters. To be more Specific, it replaces some characters with a '\0' Example: Where it should be NIC it returns sometimes N\0\0
0
5702
by: Ben Holness | last post by:
Hi all, I have a system which allows users to enter a message on a (PHP) website. This message is then put into a (MySQL) Database. A perl script then picks up the message and creates an XML document. The webpages, database and XML are all UTF-8, however every now and then I get an error in the XML parser that tells me I have an invalid token. This occurs when the message contains particular characters, although I don't
7
7184
by: Nadav | last post by:
Hello, When I create an XML header using this code: XmlDeclaration header = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootElement = doc.DocumentElement; doc.InsertBefore(header, rootElement);
1
2984
by: romiko2000 | last post by:
Hi Folks, I got a weird problem, I create an XMLWriter to post a document via the webrequest stream and after running a network trace, I notice the data is prefixed with 3 invalid characters! The invalid characters are: ef bb bf, at the top of the stream, which are . Why is this occuring, I am totally baffled by this? Here is the stream:
4
7349
by: jvictor118 | last post by:
I've been using the xml.sax.handler module to do event-driven parsing of XML files in this python application I'm working on. However, I keep having really pesky invalid token exceptions. Initially, I was only getting them on control characters, and a little "sed -e 's/ ]/ /g' $1;" took care of that just fine. But recently, I've been getting these invalid token excpetions with n-tildes (like the n in Espaa), smart/fancy/curly quotes and...
3
3093
by: =?Utf-8?B?Vmlub2Q=?= | last post by:
Hi All, I am facing an issue in the XmlTextWriter class in the dotnet 2.0. This is the sample code Actual XML is like this <Name>詳細仕様に</Name>
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10624
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.