I have some code in one of my existing .asp pages that is enclosed in . When I put that inside a page, it just shows the exact same text. On my ASP page it doesn’t show.
It appears that part of your message may have gotten stripped out. As you know, you can wrap your text in `` tags to ensure that certain characters don’t cause your text to get stripped.
As to the code you’re including on your pages, can you create a barebones HTML file containing your ASP code in the body, save it with an .asp extension, and see if it behaves as expected when loaded from your IIS environment? Once you can ensure that your ASP code works outside of CM1 generated pages, we should be able to get it working in CM1 pretty quickly.
The code works just fine outside of Percussion. I have been using it for about 4 months now.
Sorry for what might be more obvious questions, but can you confirm that your ASP code works on this particular IIS server outside of the CM1 generated pages? I believe (I may be wrong) that this server was setup recently for CM1, so I just want to ensure that you have 100% confirmed that ASP is properly configured on this instance of IIS. If you can confirm this, also be sure that the file extensions are the same (.asp) on your CM1 pages as on your functional pages. Again, my apologies if this is all stuff you have already been over.
The ASP code does work on the new IIS servers.
What type of filename extension are you using for the pages containing ASP code in CM1? Have you tried the code in both HTML widgets and the Additional Head Content Meta-Data insert points? Finally, does the ASP code function if you were to wrap it in HTML comments like so:
<!-- <% ASP code %> -->
I didn’t think that Percussion used file name extensions. I have tried the code in a rich text widget and and the header content meta-data with no luck. Does it have to go into a HTML widget only? I haven’t tried the
<!-- <% %> --> section yet.
By default, CM1 publishes its pages without an extension, but if you’re including server-side scripting code in your content, you’ll want to change the file names in CM1 to include a specific extension. To do this, simply open up the page containing your scripting language in the editor, hover over Actions, and select Edit Meta-Data, and then in the top “file name:” field add your code’s required extension – .asp, .aspx, .php, .cfm, etc.
Also, the Rich Text widget will not work for scripting code, as the editor will automatically strip out unrecognized tags and elements in the source view. It will need to go in either an HTML widget or the Meta-Data’s additional content insertion points.
Thanks for all the information. I’m still having zero luck with this. I’m using ASP code that I tested on my new server and it works. When I change the page to have an extension of .asp and then add the code to the HTLM widget, it just shows all the code I added and not what it should be.
Are these two pages (the functional ASP page and the non-functional ASP page) public on your new IIS server? If so I would love to take a look at them to see if I can spot what might be causing your ASP code to fail on your CM1 page.