Select to view content in your preferred language

Flex Viewer index.html to index.asp possible?

734
3
05-17-2011 10:10 AM
MarcWeinshenker1
Regular Contributor
I'd like to add some simple ASP hit counter code to the Flex Viewer index.html file but when I change index.html to index.asp I get a 500 error regardless of whether or not there is any ASP code added to the file.  Is there something about the index.html that does not like being .asp?   Is there any way to get this to work?

Thanks,
Marc
Tags (2)
0 Kudos
3 Replies
ToddZimmerman
Deactivated User
That should work. I have the flex viewer embedded in an ASPX page that authenticates the user. I just created a blank default.aspx page in Visual Studio and then copied the entire <head> and <body> sections from the default.htm page. What is the specific 500 error that you are getting?
0 Kudos
MarcWeinshenker1
Regular Contributor
The error is "500 - Internal server error."  The log shows it primarily as 500 0 0 218, but there are also some instances of 500 0 0 202.

What happens is this:  if I simply make an unedited copy of the Flex Viewer index.html file and name it index.asp and then use that index.asp in the URL, I get the error.  In contrast, if I create a new directory under wwwroot and inside it I place an index.asp file with some generic html, it works fine with or without any asp code inside.

I can get around this by creating a separate entry asp page and put html code in it to redirect to the index.html, but it seems unnecessary.
0 Kudos
MarcWeinshenker1
Regular Contributor
Okay, found a fix.  Apparently ASP (possibly only Classic ASP) does not like nested object tags such as found in the <noscript> section of index.html.   I took the section with the nested object in <!--[if !IE]--> through <!--<![endif]--> and put it in a text file, and then used a file include as a substitute.  I didn't make this up -- I found it out there in the aether.  But it works. 

Onward.....
0 Kudos