vbscript embedded in page hosted in iis not executing - iis

I inherited an old classic asp app. I am trying to get it to run locally on iis on windows xp. I am having trouble getting the vbscript pieces to execute.
I then went and created a simple vbscript hello world page and it still is not executing and rendering as expected.
Does anyone know if there is an iis setting that will not allow vbscript to execute?
Thanks for any thoughts.

I found the issue - it actually ended up being a browser issue. It was a combination of using an incorrect version of one browser coupled with some default internal settings on another browser.
sorry for any confusion.

Related

Error 500 in IBM Notes Client 9.0.1

I am facing issue (Error:500 Unexpected run time error ) in some cases when xpages based application is opened in Note 9.0.1 client. This issue is not reproduce because when you restart your client it automatically resolve the problem and its not come very often.
Initially we were using Server 8.5.3 but we have upgraded server to 9.0.1 FP4HF71. We have not observed this issue on 8.5.X clients.
Can anybody tell why this issue sometime occur on some machine and automatically issue is fixed when machine re-starts .
Anybody else facing same issue or not? Possible solution?
It works well other than xpages apps.
Thanks,
Qaiser
Is this while you're developing? If you make a change in Domino Designer and want to see the change in XPiNC, you need to close Notes and re-open. It's to do with how the applications are loaded and how the XPages runtime differs in XPiNC vs server. (My guess is that the XPiNC XPages runtime uses the .class files for the application loaded in memory, but building the application recreates those - it has to - so the files are no longer available for the XPiNC runtime.)
There's no way round it and my recommendation (and what I've used for XPiNC development on other projects) is develop and test in Firefox, then do a final review in XPiNC when complete. Troubleshooting in Firefox is significantly easier than XPiNC, even with Firebug Lite plugin, so it will be an easier development experience.
The biggest single different with XPiNC look and feel / processing is if #DbLookup and #DbColumn are coded with "" as the first parameter, which works on browser but is bad practice. Following best practice of using #DbName() as the first parameter will yield consistent results on XPiNC and browser.
It won't occur for non-XPages applications, because they are the only applications using the XPages runtime built into the Notes Client for XPiNC.
Try changing the port under Preferences -> Domino Designer -> Web Preview Port to 8080 or something along those lines. Maybe port 80 is already in use.

How to enable ASP on a web server?

It looks like my server has ASP disabled because when trying to view an ASP file its source code is shown in the browser. After doing some research I've heard I can enable ASP on my server using IIS - is this correct? I've set up my website in IIS as far as I could; it's not asked me for FTP details or anything so I don't know how it's going to 'install ASP'... I've enabled ASP via the Control Panel so it appears within IIS, but don't know where to go next. Am I headed in the right direction?, could anyone give me some advice as I'm not sure if I'm barking up the right tree. Many thanks in advance.
I just tried this on my Windows 7 Professional box. Once I added the feature using "Add Windows Features", and refreshed IIS Manager, Classic ASP just showed up in the handler mappings.
Make sure Enable Parent Path = true in behavior Section of ASP in IIS.
Go into your programs > windows features. Find IIS, and go to www services. You should see ASP there. You may have to enable it in IIS as well - you haven't mentioned what version of IIS you're using (or OS), so I'll leave that up to you.

Is there a website level setting in IIS that would prevent an ASP page from being served?

Trying to copy a website to a new server as the old one is dying. :(
I tried copying over the files and setting it up manually, but some specific user accounts needed to be used and the guy who set all this up left the company nearly 5 years ago. And is even worse at documentation than I am.
Anyway, at that point the ASP pages were serving, but getting errors. Ok, fine... I went back and exported the configuration from the old server (lucky that worked at all) and created a new website from that config on the new server. On the new website, from the config file, the ASP pages are giving 404 errors.
The Active Server Pages extension is enabled, and I can actually get the asp pages to serve from another website on the server... so I'm thinking it's something at the website level. No idea what though.
Any ideas?
Back when I was doing classic ASP development we used Parent Paths. This is at the top of your ASP file you'll see something like;
<!--#include file="../../resource/includes/MSSQLconnection.asp"-->
This isn't enabled by default in IIS. It may not be answer but worth looking at. But was a long time ago now.
Hope this helps,
Mike
404 is a file not found error.
Start by checking you can access a 'hello world' HTML file in the folder using http: //localhost/path/toyour/HelloWorldFile.htm
Hello World
is all you need in the file = you don't need to bother with any HTML markup to test what we're interested in.
This will check that your virtual directories, application settings etc are correct before you move on to the Active Server Page settings.
Once you've got your paths sorted out and you know you are looking for your application in the correct place move on to a 'hello world' ASP file
<%="Hello World"%>
is all you need in that file!
You ask about settings in IIS which will stop ASP from working. These come to mind as the most obvious.
Depending on the OS (or more specifically the IIS version) you may also need to activate ASP pages.
These instructions from msdn cover Windows 2003 (IIS6) and Windows 2008(IIS 7.x)
If you can get your hello world script working you can move on to debugging your application.
It will be a great help when debugging the application if you can see what's going wrong so I recommend that you turn off friendly error messages if you are using Internet Explorer. Also set IIS to pass error messages on to the browser
see:
http: //learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/ --excuse the link formatting but SO's newbies can't post more than 2 hyperlinks in a message was getting in the way of me trying to be helpful and earning enough rep to post more!
(that may only be relevant to IIS 7.x I don't have an IIS6 installation lying around to refresh my memory.
Make sure you are browsing your application on the server using http: //localhost - this should ensure you see any errors
Good luck

Launch local folder from XPSP2+ / IE8

We've got an intranet which normally serves all info/documents that appl to the whiole company (employee handbooks, minutes, etc...)
Most of these work by having the web server parse a folder and present the files to the user.
The problem in this case is that the latest folder is restricted to cerain users. As Kerberos is not currently an option, I was planning to side-step the issue and just insert a link which opens up a UNC path:
file://\Server\SecureFolder\
I've just found out that since XPSP2 this hasn't been possible with standard HTML/JS.
Does anyone know of a nother way this can be done? It's internal so I've got a lot of control over the webserver (but domain config changes will have to be justified)
I'm wondering if there's something like .Net or an ActiveX [shudder] solution or similar?
Thanks in advance for any help.
Seems the solution was to do it without Javascript and without the file://
The following works:
Link

Diagnosing HTTP 500 errors in Classic ASP

I have recently inherited a website written in Classic ASP, and am currently trying to get a sense of the state of things. The website is working in production, however the development environment (hosting on a Windows Server 2003 box) produces an HTTP 500 error when you try to navigate to it.
I realize that HTTP 500 errors just mean that an unexpected server error occurred, and that this also is more than likely the ASP code crashing for one reason or another. I have tried numerous browsers (IE, Firefox, and Chrome) but they all have the same amount of information.
Being primiarly an ASP.NET developer I am use to the yellow screen of death which can be configured to show a stack trace.
So my question is, how do I convince IIS and/or Classic ASP to give me a better hint about what is causing the error?
Update:
I should have gone into more detail originally, but here are some of the things I've looked at.
I've looked at the event logs
(Application, Security, System, etc)
and there is nothing relevent there.
I have looked at the IIS access logs
and I see the access attempts, and
just 500 errors. It is even
producing 500 errors on favicon.ico
If you can't find the offending line by turning off "Show friendly HTTP error messages" as Wayne suggested, then try adding "On Error Resume Next" to the code along with response.write statements. I've found with problems like these, you just have to start going line by line through the code until you find the offensive code.
Just out of curiosity, is Active Server Pages set to allowed in the Web Server extensions in IIS on the dev servers?
Have you checked the Application portion of the web server's Event Viewer for error entries?
What alex said, also make sure that you turn off "Show friendly HTTP error messages" in Internet Explorer and then browse to the site; that tends to give you a more specific error message (although still generic compared to ASP.NET's stack trace) along with the line number.
If you have a global.asa file in your web directory, you could rename the file and try loading the favicon.ico file again. If it loads, the problem lies within the global.asa
Clearly an old question, but for what it's worth, if you have access to the development server (direct or remote desktop), you can access the site from there. Localhost requests reveal more debugging information about classic ASP including line numbers.

Resources