Solved

ASP Page renamed to ASPX error web.config file help needed

Posted on 2013-12-05
15
1,250 Views
Last Modified: 2013-12-06
I have IIS 6 asp.net on Windows 2003 server

one of the guru's on this site gave me and asp classic code.
When I renamed it from music_9.asp to music_9.aspx

I have many ASP pages on my site and they are all named using .asp extension.

If I have .asp already working but my IIS show asp.net and I really using asp.net or asp classic?

I get this error:
But the error tells me I need to modify my web.config file.

Server Error in '/' Application.

Runtime Error
  Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".



<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.



<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 

My Web config file is

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="false" />
    </system.webServer>
</configuration>
0
Comment
Question by:Thomas Grassi
  • 7
  • 7
15 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
If it is classic ASP then you need to leave the extension as .asp

IIS will, under a standard configuration, route files with an ASPX extension through the ASP.Net parsing engine, which you don't want/need for classic ASP pages.

If you really want to use an ASPX extension for classic ASP pages then you'll need to remap the ASPX extension in IIS to point at the classic ASP parser.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
@carl_tawn is correct.  In addition, ASP.NET does not use exactly the same code syntax so you would probably have to rewrite the page to change it to an ASPX page that worked.  I would leave it as an ASP page.
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
Thanks for replying that's what I was thinking also

I renamed it back and now I get


The website cannot display the page
 
  HTTP 500
   
Most likely causes:
•The website is under maintenance.
•The website has a programming error.
   
What you can try:
   Refresh the page.  
   Go back to the previous page.  
 More information  More information  

Below is the attached code for my asp page.

Can I open that directly or do I need to create a htm page and href it?
music-9-asp.txt
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
Your code works fine on my server, IIS 5.1 on Windows XP.  Click on "More Information" to see if you can get more useful error messages.  The way the code is written, your ASP file needs to be in the "/mp3" directory to run properly.  If "/mp3" is not in your web server files, you may have to add it as virtual directory to get this to run.
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
Dave thanks for responding.

My Server runs IIS 6 Windows 2003

here is more info

   

More information  More information  

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.

I create a virtual directory in IIS which points to a network share  which is mapped as the M Drive on the server
 
M:\Music\MP3 Music Albums

The IIS alias is just MP3

When I expand MP3 I see all the folders and contents

here is the web site

http://www.tgcsnet.com/music_9.asp

also I have just a test

http://www.tgcsnet.com/music_7.aspx  that works but is only a test

check them out.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
Mapped drives are often a problem with permissions in web servers.  Go into your 'alias' setup and enable directory browsing and see if you can see the file listings in your browser.

Since your code is not in the /mp3 directory, you need to modify the path.  Try this..

<% ListFolderContents(Server.MapPath("../mp3/mp3 music albums")) %>

or this...

<% ListFolderContents(Server.MapPath("mp3/mp3 music albums")) %>
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
When I setup the alias I checked directory browsing.

In IIS when I expand the alias I see all the folders and contents does that prove I can browse the directories on the share?

How would I browse that alias in my browser?


Where in IIS do I check that ?

Did you go to my site?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
Yes, I went to your site.  http://www.tgcsnet.com/mp3/ doesn't work.  Looking at it in IIS doesn't mean anything because you are looking with the permissions of your own user, not the web server.
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
Dave thanks for checking

So where do I go from this point on?

On the share defined in the NAS (Network Storage Device) All Users Guest everyone have read/Write access.
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
The problem is that IUSR, the IIS web site user, doesn't exist on the NAS.  I don't know if you can give it permissions to access a drive that is not on the local machine.  That has been an unresolved problem in some other questions.  And it's not just IIS, Apache will act the same too.

The only solution I know of is to move the folder and files to the web folders where they can be accessed.
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
Dave,

You think If I get an external USB drive on the same server as my web server would work.

I have over 50,000 songs which is a lot of space.

If it is a local drive which a usb drive would be then it should work?

Yes IUSR would need access and one other thing I do not know the ISUR password it gets setup when you install IIS.

I could add the user on my NAS but then it would not be a AD account and it would not work.

I did see they have NAS devices that integrate with AD that might be a possible solution also.

I can test the USB with a current usb drive I use for backup purposes on my web server will let you know.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
If it is a local and not a mapped drive, it should work.  I think.  Nobody knows the IUSR password, that all belongs to IIS.  The problem is that your current setup is not a Local drive.  Integrating an NAS with AD does Not solve that problem.  AD has nothing to do with IUSR.  IUSR is local to and Only to the machine where IIS is.  It doesn't exist in AD.
0
 
LVL 23

Author Closing Comment

by:Thomas Grassi
Comment Utility
Dave

I copied some mp3 files to a local usb drive on my web server.
changed my alias to point to that folder.

All good thanks
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
You're welcome, glad to help.
0
 
LVL 23

Author Comment

by:Thomas Grassi
Comment Utility
Dave

YW

have if you have a moment can you take a look at this one for me

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_28312240.html
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now