Solved

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

Posted on 2013-12-05
15
1,285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
15 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39699544
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 83

Expert Comment

by:Dave Baldwin
ID: 39699656
@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
ID: 39699741
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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39699875
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
ID: 39699892
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 83

Expert Comment

by:Dave Baldwin
ID: 39699910
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
ID: 39699957
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
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39700005
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
ID: 39700026
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 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39700048
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
ID: 39700077
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 83

Expert Comment

by:Dave Baldwin
ID: 39700091
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
ID: 39700973
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 83

Expert Comment

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

Author Comment

by:Thomas Grassi
ID: 39701631
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

622 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