Event ID 1309 ASP.NET An unhandled exception has occurred

Windows 2012 R2 64 BIT Web Server
IIS 8.5

After moving my sites from a Windows 2003 Web Server  with IIS 6 I am seeing this error several times a day.

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          6/6/2015 5:21:00 AM
Event ID:      1309
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      SERV013.FQDN.com
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/6/2015 5:21:00 AM
Event time (UTC): 6/6/2015 9:21:00 AM
Event ID: 8df34263c84a4745abdf8d581ee99f63
Event sequence: 2
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/2/ROOT-1-130780560606599714
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\wwwroot\Music\
    Machine name: SERV013
 
Process information:
    Process ID: 32
    Process name: w3wp.exe
    Account name: IIS APPPOOL\Music
 
Exception information:
    Exception type: HttpException
    Exception message: A potentially dangerous Request.Path value was detected from the client (&).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

 
 
Request information:
    Request URL: http://www.tomsmp3.com/mp3/mp3musicalbums/&artistname&/&recordingtitle&/&trackfilename& 
    Request path: /mp3/mp3musicalbums/&artistname&/&recordingtitle&/&trackfilename&amp
    User host address: 162.210.196.98
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\Music
 
Thread information:
    Thread ID: 8
    Thread account name: IIS APPPOOL\Music
    Is impersonating: False
    Stack trace:    at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
 
 
Custom event details: Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ASP.NET 4.0.30319.0" />
    <EventID Qualifiers="32768">1309</EventID>
    <Level>3</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-06-06T09:21:00.000000000Z" />
    <EventRecordID>18215</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SERV013.FQDN.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>3005</Data>
    <Data>An unhandled exception has occurred.</Data>
    <Data>6/6/2015 5:21:00 AM</Data>
    <Data>6/6/2015 9:21:00 AM</Data>
    <Data>8df34263c84a4745abdf8d581ee99f63</Data>
    <Data>2</Data>
    <Data>1</Data>
    <Data>0</Data>
    <Data>/LM/W3SVC/2/ROOT-1-130780560606599714</Data>
    <Data>Full</Data>
    <Data>/</Data>
    <Data>C:\inetpub\wwwroot\Music\</Data>
    <Data>SERV013</Data>
    <Data>
    </Data>
    <Data>32</Data>
    <Data>w3wp.exe</Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>HttpException</Data>
    <Data>A potentially dangerous Request.Path value was detected from the client (&).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

</Data>
    <Data>http://www.tomsmp3.com/mp3/mp3musicalbums/&amp;artistname&amp;/&amp;recordingtitle&amp;/&amp;trackfilename&amp</Data>
    <Data>/mp3/mp3musicalbums/&amp;amp;artistname&amp;amp;/&amp;amp;recordingtitle&amp;amp;/&amp;amp;trackfilename&amp;amp</Data>
    <Data>162.210.196.98</Data>
    <Data>
    </Data>
    <Data>False</Data>
    <Data>
    </Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>8</Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>False</Data>
    <Data>   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
</Data>
  </EventData>
</Event>


Thoughts


Thanks in advance

Tom
LVL 23
Thomas GrassiSystems AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
it's because you're passing along the "&" character as part of your URL, and this can be seen as a threat.

you should be using Server.HTMLEncode when passing your values from page to page.
0
Dan McFaddenSystems EngineerCommented:
What are you trying to do/accomplish with these URLs?


/&amp;amp;amp;artistname&amp;amp;amp;/

I suggest you remove all the "&amp;amp;amp;" structures and work with better formatted paths.  I can't think of any good reason to have "&amp;" in an URL.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys thanks for responding

Not sure where to start here.

As I stated above all my code was working great on my windows 2003 IIS 6 platform this all started after moving to Windows 2012 IIS 8.5

I have many ASP pages on this site the error message does not point to the page.

Can you guys test out my site? www.tomsmp3.com

Thanks
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
correct, you moved to a much newer version of IIS with more built in security, which is why you're now getting the errors...

Dan makes a great point, is there a reason why you're using all of the "&amp;" characters?

I don't have time to go through every one of your pages and analyze what may be going on, I suggest you look at one of the places it's happening, see if you can duplicate the message consistently before you make any changes, if so, either remove the extra "&amp;" or use Server.HTMLEncode. If you're unsure how to do that, post the code that builds the url and we can help.

The first step though would be to find a place in your code you know you can duplicate, then go from there
0
Thomas GrassiSystems AdministratorAuthor Commented:
Big Monty

Will do may take some time  will post code later
0
Thomas GrassiSystems AdministratorAuthor Commented:
Thanks guys

The & issue may have been my sql database which had tons of unwanted characters embedded in the rows.

After I cleaned up the database my other issue json not working corrected itself.

I am closing this and will monitor this over the next few days to see if it reappears then we can revisit this .

Thanks..
0
Thomas GrassiSystems AdministratorAuthor Commented:
Big Monty

It is back.  Just got a user from the outside of my network and I got the 1309 error.

Problem is the message does not tell you which page they were using

I tested the entire site internally and did not have one error.

Thoughts on how to proceed
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
Under the Request Information, it gives you the problem URL. Only you the developer knows how that URL is built, so you'll need to hunt through your code to find where it's being called.

The & issue may have been my sql database which had tons of unwanted characters embedded in the rows.

sounds like this could be the root cause of the issue. is this still occurring?
0
Thomas GrassiSystems AdministratorAuthor Commented:
Big Monty

It only happens randomly

I will start reviewing all the code

I am currently working on one minor problem with a page my onclick refreshimage not working

If you have time can you check it out?
http://www.experts-exchange.com/Web_Development/Miscellaneous/Q_28687757.html


Thanks
0
Thomas GrassiSystems AdministratorAuthor Commented:
Big Monty

Just posted a new one on this issue can you please take a look  Thanks Tom

http://www.experts-exchange.com/questions/28688012/ASP-NET-4-0-30319-0-Event-Id-1309.html
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I'll try to have a look later on today, I'm swamped with work at the moment.

Also, it may be better to delete that question and re-open this one as it has the full history of what was tried / said. Your call though, if you do decide to, just click the "Request Attention" link at the top of this page.

Cheers
Josh
0
Thomas GrassiSystems AdministratorAuthor Commented:
Yesterday I posted this question and closed it out but it reappeared again today so I would like to reopen this

Same error is occurring randomly

It was suggested that I change my code to server.htmlencode(string)

 <%
  response.write(Server.HTMLEncode("The image tag: <img>"))
  %>



 So I went thru all the pages that are on this site a total of 12.

 The only two that build a url are below

 I have tested the site internally from several computers and externally via my iphone and I can not recreate this error.

 I am not sure what is causing the error I need a few more people to test remotely all I know is in the error message it is an external ip address that the problem occurs


music3.asp
<%
if request.form<>"" then
dim fs,fname, pathToPlayList
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("m:\playlist\myplaylist_"&Session.SessionID&".m3u",true)

pathToPlayList="/playlist/myplaylist_"&Session.SessionID&".m3u"

strSongs=request.form("selectItem")
arraySongs=split(strSongs,",")
response.write "<ul>"
fname.WriteLine "#EXTM3U" '** M3U'
for each song in arraySongs
   response.write "<li><a href=""" & replace(song,"M:\Music","/mp3") & """>" & song & "</a></li>" 
   fname.WriteLine "#EXTINF:000, "& makeSongName(song)
   fname.WriteLine "http://www.tomsmp3.com"&replace(replace(replace(trim(song),"M:\Music","/mp3"),"\","/")," ","%20")
   next
response.write "</ul>" 
fname.Close
else
response.write "You did not post any data yet<br>"
end if
set fname=nothing
set fs=nothing

function makeSongName(song)
	 p = InStrRev(song,"\",-1)
     makeSongName = mid(song,p+1,len(song)-p)
end function
%>
<input type="button" value="BACK!"onClick="history.back();">
<button value="Playlist" onclick="window.location = '<%=pathToPlayList%>'"> Playlist </button>

Open in new window


The other one musicjson.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.Buffer = false%>
<!-- #include file="db_connection.inc" --> 
{"data": [
<%

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID "
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)


' send data to an array'
if not oRs1.eof then
	myArray=oRs1.getrows()
end if

oRs1.Close
Set oRs1 = Nothing
oConn.Close
Set oConn = Nothing



for r = LBound (myArray,2) to UBound(myArray,2)
	artistname 		= myArray(0, r)
	RecordingTitle 	= myArray(1, r)
	TrackTitle 		= myArray(2, r)
	TrackFileName 	= myArray(3, r)

	TrackFileUrl = replace(TrackFileName,"M:\Music\","\mp3\")

	'M:\Music\MP3MusicAlbums\!!!\Louden Up Now\01-Louden Up Now-When The Going Gets Tough The Tough Gets Krazee.mp3

	' convert to'
	'\mp3\MP3MusicAlbums\!!!\Louden Up Now\01-Louden Up Now-When The Going Gets Tough The Tough Gets Krazee.mp3

	TrackFileLink = "<a href="&"[x]"&TrackFileUrl&"[x]"&">"&TrackTitle&"</a>"

    theURL = replace("["&chr(34)&artistname&chr(34)&","&chr(34)&RecordingTitle&chr(34)&","&chr(34)&TrackTitle&chr(34)&","&chr(34)&TrackFileLink&chr(34)&"]","\","\\")
    theURL = replace(theURL,"[x]","\"&chr(34))
    response.write theURL

        if r < UBound(myArray,2) then
    	response.write ","
    end if


next


%>
]}

Open in new window


They all are working fine this is something new on IIS 8.5 causing this error

 I am new to IIS 8.5 so not sure where to look

 The site does searches against a sql 2008 database

 I can post the other pages if needed.

 Thanks in advance

 Tom
0
Dan McFaddenSystems EngineerCommented:
What are the URLs that are being caught by the 1309?

Also, after poking around the site I noticed the following items, which I would consider issues:

1. the pages "SelectAlbums.asp" & "music4.asp", aren't serving correctly formatted HTML documents.  I only receive partial pages.  No HTML, HEAD, BODY tags at all.

2. some pages have tags on HTML elements that are not properly built.  For example:  music4.asp returns


<input type="button" value="BACK!"onClick="history.back();">

There is no space between these 2 attributes:  value="BACK!"onClick="history.back();"

3. The home page has HTML elements in the wrong place.  For example:  you have a <title> element in between the </head> and <body> elements.

4. you need to escape all non-standard characters, I am finding ampersands characters that should be &amp; instead.

What I really think you need to do is to go thru your site and debug the resultant page output with some developer tools.  the IE F12 tools are throwing warnings all over the place.  Poorly formatted HTML appears to be an issue over the entire site.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

Music4.asp

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 1000 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button<br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">
</form>

Open in new window



I ran it using F12 IE developers tools

HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "<!DOCTYPE html>".
File: music4.asp, Line: 3, Column: 1
HTML1423: Malformed start tag. Attributes should be separated by whitespace.
File: music4.asp, Line: 6, Column: 74
HTML1508: Unmatched end tag.
File: music4.asp, Line: 7, Column: 1
HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
File: music4.asp, Line: 7, Column: 8


There is no space between these 2 attributes:  value="BACK!"onClick="history.back();"

I added a space and now the console message
HTML1423: Malformed start tag. Attributes should be separated by whitespace.
File: music4.asp, Line: 6, Column: 74

no longer shows

my problem is as you can see in the code the line  number does not match  how does this count?
How can I find what is wrong if the line numbers do not match
Am I missing something here?

I am new to this debugger

Once I figure out how to do this I can review each page


Thanks
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
to match up the line numbers, you'll have to do a view source and get the rendered html, and then match up the line numbers.

I'm played around the site and never got any errors thrown my way
0
Dan McFaddenSystems EngineerCommented:
I haven't received an error today either, but I have noticed, as stated above, that the rendered HTML is not up to par.

Also, if you look at the music4.asp page you posted... where are all the expected HTML elements that make up a typical HTML page?

The page consists of:

1. an include declaration
2. the ASP code that builds some style elements and hits the database
3. the opening of a <form> element
4. the ASP code that builds the display of the sql query result set
5. a <button> element
6. an <input> element
7. a closing of the </form> element.

Where is the rest of the HTML?   This was the same for the SelectAlbums.asp page.

I haven't found a way to reproduce an error on the site since you cleaned up your data.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

I am down to these two

HTML1508: Unmatched end tag.
 File: music4.asp, Line: 8, Column: 1
 HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
 File: music4.asp, Line: 8, Column: 8


I am working on one at a time right now music4.asp


can you guys check this out see if you get the same results? from the main page select genre search

I reduced the number of output from 1000 to 100 for faster results.
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you need a body tag at the very minimum:

<!DOCTYPE html>
<head>
files references go here, as well as javascript code
</head>
<body>
<form method="post" action="music3.asp">

<font style="font-size: 20px; color: #ff0000; font-family:verdana">Select Songs you Wish to Add to Your Playlist then click on Submit button<br /><br />
all of your content
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">
</form>
</body>
</html>

Open in new window


I suggest you going through some basic tutorials on HTML to help you better grasp how pages are built. If you can master these simple concepts, you'll be better off in the long run.
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

Yes need to brush up on html code

But this does not explain why I am getting this error


I can clean up the pages it will take some time
0
Dan McFaddenSystems EngineerCommented:
The errors are still there.  The HTML that is being rendered by your code is not complete.  The error refers to the fact that the browser found the end of the file when it was expecting other elements to be properly closed.

The page "music4.asp" is not rendering (building) a properly formatted HTML document.

1. there is an <!DOCTYLE HTML> open tag but no closing tag (indicating HTMLv5)
2. there is no <HEAD></HEAD> element at all
3. there are no head child elements... meta, title, etc. tags
3. there is no <BODY> open tag and no </BODY> closing tag

Your page consists of a form element, several nested <FONT> tags that seem out of place, <INPUT> tags and multiple <DIV>  tags

This is a basic HTMLv5 document.
<!DOCTYPE html>
<html>
<head>
<title> document title </title>
</head>
<body>
 content goes here...
</body>
</html> 

Open in new window


Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

Thanks

Almost have music4.asp just one problem

my new code

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 100 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<!DOCTYPE html>
<head></head>
<body>
<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button<br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">
</form>
</body>
</html>

Open in new window



I am using Microsoft Expression Web 4 and the </html>  is marked as  mismatched end tag

Whats wrong?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you need a starting HTML tag, so

<!DOCTYPE html>
<head></head>
<body>

should be

<!DOCTYPE html>
<html>
<head></head>
<body>

the line

<!DOCTYPE html>

just sets the document type to html5, it's not a replacement for the actual html tag
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Thanks

Now in Microsoft Expression Web 4 I have clean code no undefined tags etc.

but the debugger still shows these two errors

HTML1508: Unmatched end tag.
File: music4.asp, Line: 11, Column: 1
HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
File: music4.asp, Line: 12, Column: 1


current code

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 100 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<!DOCTYPE html>
<html>
<head></head>
<body>
<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button<br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">
</form>
</body>
</html>

Open in new window


If you view the site see if you get the same results I publish the page about 15 mins ago.


Thoughts
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you're not closing your font tags when you use the strFont1 / strFont2 variables
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Thanks

I tried adding </font>   but it does not work page would not display

Tried adding to bottom of code but I get mismatched end tag

where can I put the code?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
try this:

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 100 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<!DOCTYPE html>
<html>
<head></head>
<body>
<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button</font><br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div>/font>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">
</form>
</body>
</html>

Open in new window


BTW, the FONT tag has been deprecated, you should really be using CSS to style your tags, but let's save that for another time
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

sounds good I used some CSS on this site but not all of the pages

The above code adds /font> to the output line


check it out
http://www.tomsmp3.com/music4.asp?genre=Hard+Rock

My current code

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 100 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<!DOCTYPE html>
<html>
<head></head>
<body>
<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button<br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div>/font>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">

</form>
</body>
</html>

Open in new window



While we are working on this I have tested some of the other pages found similar issues

so once I get this page clean then the others should be clearer to work on not all the way thru the site yet

Thanks
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
looks like good progress, although you have a typo:

/font>

needs to be

</font>

I'm not entirely convinced this is the issue, but it will at least eliminate one potential source of the problem, which is helpful when debugging
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

I agree yes debugging is a great exercise


Fixed the </font>

but still getting the same two
HTML1508: Unmatched end tag.
 File: music4.asp, Line: 12, Column: 1
 HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
 File: music4.asp, Line: 13, Column: 1


current code

<!-- #include file="db_connection.inc" --> 
<%
dim searchWord
dim strFont1
dim strFont2
searchWord = Request.Querystring("genre") 
strFont1 = "<font style=""font-size: 20px; color: #ff0000; font-family:verdana"">"
strFont2 = "<font style=""font-size: 16px; color: #000000; font-family:verdana"">"

Set oConn=Server.CreateObject("ADODB.Connection") 
oConn.Open strConnect
strSQL1 = "SELECT TOP 100 dbo.Artists.artistname, dbo.Recordings.RecordingTitle, dbo.Tracks.TrackTitle, dbo.Tracks.TrackFileName FROM  dbo.Artists INNER JOIN dbo.Recordings ON dbo.Artists.artistid = dbo.Recordings.ArtistID INNER JOIN dbo.Tracks ON dbo.Recordings.RecordingID = dbo.Tracks.RecordingID WHERE (dbo.Recordings.genre = '"&searchWord&"')"
Set oRs1=oConn.Execute(strSQL1,lngRecs,1)
%>

<!DOCTYPE html>
<html>
<head></head>
<body>
<form method="post" action="music3.asp">

<%
Response.Write strFont1 & "Select Songs you Wish to Add to Your Playlist then click on Submit button<br />"
Response.Write "<br />"

if not oRs1.eof then
    do until oRs1.eof
       response.write strFont2 & "<div class=""results""><input type=""checkbox"" name=""selectItem"" value="""&oRs1("TrackFileName")&"""> "&oRs1("artistname")&" "&oRs1("RecordingTitle")&" "&oRs1("TrackTitle")&" "&oRs1("TrackFileName")&"</div></font>"
    oRs1.movenext
    loop
end if

%>
<button type="submit">Submit</button>  <input type="button" value="BACK!" onClick="history.back();">

</form>
</body>
</html>

Open in new window

0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
can you post the rendered code by copying & pasting when you do a view source?

also, how are you validating it? or are these messages that pop up in the IIS log file?
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

I am using F12 IE debugger to see these messages using IE 11
Do not need to do a view source when you use the debugger tool the source is displayed in the debugger tab makes it very easy to track issues.

Just wish I knew how to fix some of these.

Attached is the view source

See can see the same by going to www.tomsmp3.com  hit f12 using IE then click on genre search button


Thanks
music4.txt
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I was using Chrome, which is sometimes a bit more forgiving on html errors.

I broke down your code to only display one record, and formatted it with the proper indents, and tat showed me where the error was occurring. You did not have a closing FONT tag for your title text:

<!DOCTYPE html>
<html>
	<head>
	</head>
	<body>
		<form method="post" action="music3.asp">

			<font style="font-size: 20px; color: #ff0000; font-family:verdana">
				Select Songs you Wish to Add to Your Playlist then click on Submit button<br /><br />
			</font>   <-- I added that and it worked
			
			<font style="font-size: 16px; color: #000000; font-family:verdana">
				<div class="results">
					<input  type="checkbox" 
							name="selectItem" 
							value="M:\Music\MP3MusicAlbums\AC-DC\74 Jailbreak\01-74 Jailbreak-Jailbreak.mp3" /> 
							AC-DC 74 Jailbreak Jailbreak M:\Music\MP3MusicAlbums\AC-DC\74 Jailbreak\01-74 Jailbreak-Jailbreak.mp3
				</div>
				
			</font>
		</form>
	</body>
</html>

Open in new window


I would recommend trying to get in the habit of indenting your code, so that it almost has an "outline" or "tree" look to it, that way it makes it easier to figure out what the issue is. I would also recommend getting away from using the FONT tag, and use css classes, or even inline styling if you have to.
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Got it working clean now on all but three pages not bad for a days work.

1. my Disclaimer Page      disclaimer.htm
HTML1506: Unexpected token.
File: Disclaimer.htm, Line: 35, Column: 1

<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Disclaimer</title>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-46536895-1', 'tomsmp3.com');
  ga('send', 'pageview');

</script>
</head>

<body>
<h1 style="text-align:center;">Disclaimer</h1>
<p>Company TGCSNET provides the www.tomsmp3.com Web site as a service to the public and Web site
owners. Company TGCSNET is not responsible for, and expressly disclaims all liability for, damages of 
any kind arising out of use, reference to, or reliance on any information contained within the site. While
the information contained within the site is periodically updated, no guarantee is given that the
information provided in this Web site is correct, complete, and up-to-date. Although the Company
TGCSNET Web site may include links providing direct access to other Internet resources, including Web
sites, Company TGCSNET is not responsible for the accuracy or content of information contained in
these sites. Links from Company TGCSNET to third-party sites do not constitute an endorsement by
Company TGCSNET of the parties or their products and services. The appearance on the Web site of
advertisements and product or service information does not constitute an endorsement by Company
TGCSNET, and Company TGCSNET has not investigated the claims made by any advertiser. Product
information is based solely on material received from suppliers.</p>
</body>

<form method="post">
<input type="button" value="BACK!" onClick="history.back();">
</form>
</html>

Open in new window


2. The Main Page    music.asp
Has about 6
I attached the main page to long to place in the code.
Has a I list table and three of  the error are because I have R&B    the & not valid I think.
I have to fix the sql database first to change all those records.

see attached


3.  Music3.asp
HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "<!DOCTYPE html>".
File: myplaylist_34576229.m3u, Line: 1, Column: 13.
<!DOCTYPE html>
<%
if request.form<>"" then
dim fs,fname, pathToPlayList
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("m:\playlist\myplaylist_"&Session.SessionID&".m3u",true)

pathToPlayList="/playlist/myplaylist_"&Session.SessionID&".m3u"

strSongs=request.form("selectItem")
arraySongs=split(strSongs,",")
response.write "<ul>"
fname.WriteLine "#EXTM3U" '** M3U'
for each song in arraySongs
   response.write "<li><a href=""" & replace(song,"M:\Music","/mp3") & """>" & song & "</a></li>" 
   fname.WriteLine "#EXTINF:000, "& makeSongName(song)
   fname.WriteLine "http://www.tomsmp3.com"&replace(replace(replace(trim(song),"M:\Music","/mp3"),"\","/")," ","%20")
   next
response.write "</ul>" 
fname.Close
else
response.write "You did not post any data yet<br>"
end if
set fname=nothing
set fs=nothing

function makeSongName(song)
	 p = InStrRev(song,"\",-1)
     makeSongName = mid(song,p+1,len(song)-p)
end function
%>
			<input type="button" value="BACK!" onClick="history.back();">
			<button value="Playlist" onclick="window.location = '<%=pathToPlayList%>'"> Playlist </button>

Open in new window


Think the last to lines need to included in a parent tag


You can go to the site and see the errors for better explanation


Any help on these last three would be greatly appreciated.

Side Note: With all the updating of the site and my testing I have not seen the 1309 error but again remember I said that it was only from outside sources that I saw that from.
Still monitoring this .

Thanks

tom
music.txt
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

I fixed number 1 above.  changed from using form to script code is cleaner.

Take a look if you can.

Now on to number 3

Hope you guys can help me with number one
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

Got Music3.asp almost working

when the page is linked from another page it comes up clean no errors.

When you click on Playlist or select a line to play by clicking on it I get this on the next display in debugger

HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "<!DOCTYPE html>".
File: 1-03-Favorites-Highway%20To%20Hell.mp3, Line: 1, Column: 1



Thoughts

Thanks
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

Late night.

My last posting still struggling with

And the Main Page got it down to 1 error in the code the others are twitter and facebook code.

The only error I can see besides the FB and twitter code is this one
HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
File: www.tomsmp3.com, Line: 271, Column: 1

I attached the latest main page

Thanks

Sure could use another pair of eyes or two
music.txt
0
Dan McFaddenSystems EngineerCommented:
Here is what I found this morning (my time).

1. The home page:
- The <font> tags are not closed at lines:  24, 28, 32
- The <body> tag is not closed.  This should be the next to last line = </body>
- The <html> tag is not closed.  This should be the last line = </html>

2. The MusicGtable.asp"
- you have 2 HTML tags in use.  delete the <html>, which is the second line on the rendered page.

3. The MusicAtable.asp"
- you have 2 HTML tags in use.  delete the <html>, which is the second line on the rendered page.
- The <html> tag is not closed.  This should be the last line = </html>

4. The musictable.asp"
- you have 2 HTML tags in use.  delete the <html>, which is the second line on the rendered page.

5.  the disclaimer page - you closed the <BODY> tag in the middle of the page, which placed the <FORM> element outside of the body.  Here is the rendered page that I got (I tabbed it for better viewing):

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
	<title>Disclaimer</title>
	<script>
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

		ga('create', 'UA-46536895-1', 'tomsmp3.com');
		ga('send', 'pageview');
	</script>
</head>

<body>
	<h1 style="text-align:center;">Disclaimer</h1>
	<p>
		Company TGCSNET provides the www.tomsmp3.com Web site as a service to the public and Web site
		owners. Company TGCSNET is not responsible for, and expressly disclaims all liability for, damages of 
		any kind arising out of use, reference to, or reliance on any information contained within the site. While
		the information contained within the site is periodically updated, no guarantee is given that the
		information provided in this Web site is correct, complete, and up-to-date. Although the Company
		TGCSNET Web site may include links providing direct access to other Internet resources, including Web
		sites, Company TGCSNET is not responsible for the accuracy or content of information contained in
		these sites. Links from Company TGCSNET to third-party sites do not constitute an endorsement by
		Company TGCSNET of the parties or their products and services. The appearance on the Web site of
		advertisements and product or service information does not constitute an endorsement by Company
		TGCSNET, and Company TGCSNET has not investigated the claims made by any advertiser. Product
		information is based solely on material received from suppliers.
	</p>
</body>
	<br>
	<form method="post">
		<input type="button" value="BACK!"onClick="history.back();">
	</form>
</html>

Open in new window


The </body> tag at line 32 needs to be moved to directly above the </html> tag.

Dan
0
Dan McFaddenSystems EngineerCommented:
I have a few recommendations for you and the site.

1. As Big Monty already said... use CSS to manage the layout and styling of the site.  The source of many of the pages errors had to do with incorrectly closed tags... many were <FONT> tags.  Which, as BM said, has been depreciated.
1a.  Check out CSS frameworks like:

- http://getbootstrap.com/
- http://foundation.zurb.com/
- http://getskeleton.com/

List of CSS frameworks:  http://mashable.com/2013/04/26/css-boilerplates-frameworks/

2. Use a standard HTML template as a starting point for every page you build.  I would check out the HTML5 Boiler Plate as a good starting point.
2a.  link:  https://html5boilerplate.com/
2b.  the HTML5 BP can be downloaded in its default config, as a responsive temple or with BootStrap integrated.

3.  regularly check your data in the database.  I believe this is where the major source of errors will hide.  You have to watch out for extended characters that need to be escaped when used in URLs and links.  For example, on your "all artist" page, there is an artist named "!!!"  which will most likely be an issue.

This was the issue on one of your other questions, where there was random HTML markup being stored in various fields in various tables.

Just a few suggestions that may help simplify your dev process for new projects.

Dan
0
Dan McFaddenSystems EngineerCommented:
One last thing, the following pages are throwing a "401, unauthorized error" after checking an item and hitting submit.

1. SelectSongs.asp
2. SelectAlbums.asp

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

Thanks for the heads up

Yesterday I was trying to fix things and I changed authentication settings on the site in IIS 8.5 I went into the Authentication and enabled Windows Authentication HTTP 401 Challenge

I believe that is the reason for the 401 error?

I just disabled it an only have Anonymous Authentication Enabled

I did a iisreset /noforce

but still getting the 401 error

Thoughts?

I did fix all the above code except for 2 pages the main page and music3
Disclaimer an the others where clean

CSS is the way to go in the future in true.


Any thoughts on the 401 error


Thanks
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan/Josh

Got the 401 error resolved.  Had to rebuild the entire site under IIS 8.5

Changing the authentication method  really messes things up

Now struggling with WebDAV again

If you guys have time check the site out again

I believe only music.asp and music3.asp have one error left in each.

music.asp in the main page I will look into using css to rebuild that page after we get all the errors removed.

Thanks
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
for music.asp, you don't have closing FONT tags on line 23 or 27 or 31 (when you do a view source).

how do I access music4.asp? my guess is it's the FONT tags, I strongly urge you to convert them to something else (like <span> for example) and add a css class to it
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Thanks

As soon as I get WebDAV working again I will look at the missing fonts

music4.asp is the search by genre on the main page that one is clean

The one that has a problem still is music3.asp

Only when you select playlist or click on the song from the page you get one error in debugger


Will work on the css in the next part of this project. I like the CSS code
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
i get a 404 error (missing or invalid path) when I click on the song title / track.

did you create a virtual folder for /mp3/mp3MusicAlbums/
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Just did that's the problem when rebuilding the site you always forget something.

Still getting 404 when I click on a song

thoughts?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
404 errors indicate the file you're trying to call doesn't exist, double check your spellings and virtual folder mappings
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh
 two virtual paths
 1. /MP3
2.  /Playlist


I created them from memory  in music3.asp it looks the same can you check?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
this is the path to a file that is failing:

http://www.tomsmp3.com/mp3/MP3MusicAlbums/AC-DC/Favorites/1-10-Favorites-Shot%20Down%20In%20Flames.mp3

i think you need a virtual folder for MP3MusicAlbums
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Got it

Had a bad path in the virtual directory

You should now be able to continue with music3.asp by clicking on playlist and the song

Sorry about that
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
if there's a specific problem you're encountering, I'll be more than happy to try to help fix it, but I don't have time to just go through your site and test everything. That is something you should be doing, then posting here what problems, if any, arise. I'm not trying to be a jerk, I just really don't have the time and don't want to set unrealistic expectations
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

No problem I am going out for awhile too need to take a break from this too.

As soon as I get the WebDAV problem resolved then I can finish with this too.

Thanks for you help
0
Thomas GrassiSystems AdministratorAuthor Commented:
Guys

Just got another 1309 error user host was 91.121.169.194   one of yours?

Some one in France
 Wish I knew what they are trying to cause this error

I went thru every function on my site and have not created this error.

WE are down to just the main page and music3.asp

I am guessing they are entering a bad character in the search box just a guess

No where In the code I find &amp

WE need to re look at this

Thanks
0
Dan McFaddenSystems EngineerCommented:
Thomas, if you have http logging enabled, you can look into the http logs and correlate the event log error message to an http request (or set of requests) that occurred right before or exact at the time in the event logs.

As always, I always recommend, HIGHLY recommend, turning on http logging.  It is an invaluable resource when trying to troubleshoot issues.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

sounds good

is there an easier way to view the log files?
0
Dan McFaddenSystems EngineerCommented:
Not if you are looking for a specific time and event.  If you have the time stamp from the event id, then just open the log in a text editor and search for the time.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

I got another 1309 tonight

checked the log file and saw nothing that would indicate an error condition. Unless I am looking in the wrong place.

But I did more research and found this

http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_potentially_dangerous.htm

Was hoping you or Josh could help me on this one.

Thanks
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
the link you gave gives a fix if you're using .NET, unfortunately it doesn't pertain to classic asp.

at this point, I'm unsure of what else we can tell you. According to the previous logs you posted, the issue was occurring because of bad characters (such as the & char, for example). Somehwere on your site, that character is getting passed from page to page, whether it's coming from the DB or user input, it's impossible for us to know without full access to the code.
0
Thomas GrassiSystems AdministratorAuthor Commented:
Josh

Thanks

My guess is it is from the user

I was still working on the main page I opened another problem for that code
http://www.experts-exchange.com/questions/28688747/Change-HTML-Marguee-to-CSS.html

Have time to take a look?

Thanks
0
Dan McFaddenSystems EngineerCommented:
Thomas, I agree with BM, that without access to all the code, its now become harder to troubleshoot.

Could you post the http log entries surrounding the time when the 1309 error appeared in the event log?  I would say 5 minutes before and 5 minutes after would help.

And can you post the XML version of the event log message?

1. double click on the error message in the event log
2. click on the details tab
3. select the radio button labeled XML View
4. select all and paste in EE

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

I attached the web log from yesterday not that big of a file

The event 1309  occurred twice yesterday
1:00:36 PM on 6/11/2015
6:57:28 PM on 6/11/2015

XML Version of event error

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          6/11/2015 6:57:28 PM
Event ID:      1309
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      SERV013.FQDN.com
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/11/2015 6:57:28 PM
Event time (UTC): 6/11/2015 10:57:28 PM
Event ID: d164b46f181242eab518397c8e296d6c
Event sequence: 2
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/4/ROOT-1-130785370488489018
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\wwwroot\Music\
    Machine name: SERV013
 
Process information:
    Process ID: 7928
    Process name: w3wp.exe
    Account name: IIS APPPOOL\Music
 
Exception information:
    Exception type: HttpException
    Exception message: A potentially dangerous Request.Path value was detected from the client (&).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

 
 
Request information:
    Request URL: http://www.tomsmp3.com/mp3/mp3musicalbums/&amp;artistname&amp;/&amp;recordingtitle&amp;/&amp;trackfilename&amp 
    Request path: /mp3/mp3musicalbums/&amp;amp;artistname&amp;amp;/&amp;amp;recordingtitle&amp;amp;/&amp;amp;trackfilename&amp;amp
    User host address: 209.126.117.84
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\Music
 
Thread information:
    Thread ID: 8
    Thread account name: IIS APPPOOL\Music
    Is impersonating: False
    Stack trace:    at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
 
 
Custom event details: Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ASP.NET 4.0.30319.0" />
    <EventID Qualifiers="32768">1309</EventID>
    <Level>3</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-06-11T22:57:28.000000000Z" />
    <EventRecordID>20512</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SERV013.FQDN.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>3005</Data>
    <Data>An unhandled exception has occurred.</Data>
    <Data>6/11/2015 6:57:28 PM</Data>
    <Data>6/11/2015 10:57:28 PM</Data>
    <Data>d164b46f181242eab518397c8e296d6c</Data>
    <Data>2</Data>
    <Data>1</Data>
    <Data>0</Data>
    <Data>/LM/W3SVC/4/ROOT-1-130785370488489018</Data>
    <Data>Full</Data>
    <Data>/</Data>
    <Data>C:\inetpub\wwwroot\Music\</Data>
    <Data>SERV013</Data>
    <Data>
    </Data>
    <Data>7928</Data>
    <Data>w3wp.exe</Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>HttpException</Data>
    <Data>A potentially dangerous Request.Path value was detected from the client (&amp;).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

</Data>
    <Data>http://www.tomsmp3.com/mp3/mp3musicalbums/&amp;amp;artistname&amp;amp;/&amp;amp;recordingtitle&amp;amp;/&amp;amp;trackfilename&amp;amp</Data>
    <Data>/mp3/mp3musicalbums/&amp;amp;amp;artistname&amp;amp;amp;/&amp;amp;amp;recordingtitle&amp;amp;amp;/&amp;amp;amp;trackfilename&amp;amp;amp</Data>
    <Data>209.126.117.84</Data>
    <Data>
    </Data>
    <Data>False</Data>
    <Data>
    </Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>8</Data>
    <Data>IIS APPPOOL\Music</Data>
    <Data>False</Data>
    <Data>   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
</Data>
  </EventData>
</Event>

HTH

Tom
u-ex150611.log
0
Dan McFaddenSystems EngineerCommented:
OK, as previously stated... the 1309s are coming from your URLs having &amp;amp;  all over them.

The event log message above states it and I am seeing URLs with the &amp; in them all over the place.

This is your culprit, its a bot:

http://www.majestic12.co.uk/bot.php

I suggest you put a robots.txt file in the root of your site and block this bot.

Dan
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

Ok

what do I put in that text file  just blank?

How do I block the bot?

Never had to do this new to this stuff
0
Dan McFaddenSystems EngineerCommented:
Create text file named "robots.txt" and place it in the root of your website.

In the file, place the following text:

User-agent: MJ12bot/v1.4.5
Disallow: /

Open in new window


Dan
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

Great thanks

Do I need to reset iis?   iisreset /noforce   ????

I placed it in the sites root folder
0
Dan McFaddenSystems EngineerCommented:
No need to reset IIS. This is not an IIS configuration, its essentially a text file hosted on your site that tells crawlers what they can & can't do.
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan great

Will keep eye on the event log over the next few days to see if we get any other 1309


Thanks
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

Update

Today I received a 1309 event I used logparser to look at the Web log for the site had it convert the time stamps which made it very easy to review.

When I got to the time frame I saw the user was accessing a page that is not in production

After some research I found files in the site folder that did not need to be there so I removed them

But that was not the user who caused the error  &amp

In the log I do not see any entries from the user with the same ip address on which page they was on

When I look at the log with my ip address I see all the pages I access

I can not image what they are doing to cause this error

I am sure they are trying to do something

Any thoughts

Thanks
0
Thomas GrassiSystems AdministratorAuthor Commented:
Dan

The 1309 has not appeared in some time but that's probably because the foreign users accessing has stopped.

Closing this our for now

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.