473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

getting a default error page even though customErrors mode="Off"

denny1824
I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am getting a default error page. It is an aspx page that I am trying to view.

If I put in a fake page name it gives a different error about that fake name not existing, which means to me that it is seeing the page I want to view but is giving an error and displaying the default error page:

Expand|Select|Wrap|Line Numbers
  1. Runtime Error 
  2. 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. 
  3.  
  4. 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".
  5.  
  6.  
  7. <!-- Web.Config Configuration File -->
  8.  
  9. <configuration>
  10.     <system.web>
  11.         <customErrors mode="Off"/>
  12.     </system.web>
  13. </configuration>
  14.  
  15.  
  16. 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.
  17.  
  18.  
  19. <!-- Web.Config Configuration File -->
  20.  
  21. <configuration>
  22.     <system.web>
  23.         <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
  24.     </system.web>
  25. </configuration>
  26.  
I do have a web.config file on the root directory of the virtual folder with the customErrors mode = "Off". The website still works under the orignal folder.

How can I get the website to work under a different folder name?
Apr 13 '09 #1
15 7852
Frinavale
9,735 Expert Mod 8TB
Is your IIS set up to redirect the user to the default error page if an error occurs?
Apr 13 '09 #2
Plater
7,872 Expert 4TB
Do virtual directories allow ASPX pages to run?
Apr 13 '09 #3
to Frinavale: IIS does redirect to default page for certain HTTP errors: 403;14 is "Forbidden - Directory Listing Denied", 500 is "Internal Server Error", 501 is "Not Implemented", 502 is "Bad Gateway". I don't think I am getting any of those errors in this case. Do you know how I can be sure?

to Plater: Yes, as far as I know, aspx pages can be run in virtual directories. I have the orignal website working just fine in a virtual directory on the same machine. The only difference here is that I copied the files into a different virtual directory.

I need to have 2 copies so that I can make changes to one and still have the original available to be viewed. So right now I am just trying to get 2 copies of the same website working on the same machine. Maybe there is a better way to do it than put the second one in a different virtual directory?
Apr 14 '09 #4
Frinavale
9,735 Expert Mod 8TB
What version of IIS are you using?
Please check the Windows Event Logs for an indication of the problem as well.
Apr 14 '09 #5
IIS is version 5.1
OS is Windows XP
I dont see anything in the event viewer that indicates the problem.
Apr 14 '09 #6
Frinavale
9,735 Expert Mod 8TB
Let's create another web site for your app.
  • Open IIS.
  • Right click on the Default Web Site.
  • Select New -> Virtual Directory
  • Click Next in the Virtual Directory Creation Wizard
  • Provide "TestWebsite" as the Alias on the Virtual Directory Alias step and click Next.
  • Click the Browse button on the Website Content Directory step.
  • Browse to the C:\Inetpub\wwwroot\ directory.
  • Click the Make New Folder button and name the new folder "TestWebsite"
  • Highlight the "TestWebsite" folder and click Ok.
  • Click the "Next" button in the Web Site Content Directory step of the wizard.
  • Make sure that Read and Run Scripts (such as ASP) are checked on the Access Permissions step and click the Next button.
  • Click the Finish button.

Now we have a new website set up to point to a virtual directory located on the IIS.

Open your web application in Visual Studio. In the Solution Explorer right click on your web application's name and select Publish. When prompted for the Target location click the "..." button. This will open the Open Web Site dialogue. Select "Local IIS" in the left pane of this dialogue and select "TestWebsite" in the right pane then click the Open button. Click the Publish button in the Publish Web dialogue.

Then try connecting to the TestWebsite (be sure to provide an aspx page to connect to in the url since we haven't set up a Default Web Page for the "TestWebsite" website in IIS).

-Frinny
Apr 14 '09 #7
I dont have Visual Studio on the server. I tried making TestWebsite on the development computer.

When I try to publish TestWebsite I get the error: "You must choose a publish location that is not a sub-folder of the source Web site."
Apr 14 '09 #8
Frinavale
9,735 Expert Mod 8TB
Publish the website to a folder on your desktop.
Then upload the files in that folder to the server (into the C:\Inetpub\wwwroot\TestWebsite directory)
Apr 14 '09 #9
After uploading the files to the inetpub/wwwroot folder Ii went into IIS and set it as an application in IIS.

It is giving the same type of default error page.
Apr 14 '09 #10
Frinavale
9,735 Expert Mod 8TB
Did it give you an error before you set it up as an application?
Are you sure there is no errors/warnings being recorded in the Server's Window Event logs?
Apr 14 '09 #11
The error it gives before I set it up as an application is the same as after except that instead of the top line being "Server Error in '/TestWebsite' Application." it says "Server Error in '/' Application."

To check the Server's Window Event logs I went to Control Panel -> Administrative Tools -> Event Viewer. I see a bunch of warnings and errors about a missing printer driver, but nothing that seems to me to be about websites. Nothing shows up under Internet Explorer in the Event Viewer.
Apr 16 '09 #12
Frinavale
9,735 Expert Mod 8TB
Is the Default Website configured to use ASP.NET?
Is the testWebsite configured to use ASP.NET?
Is the ASP.NET version correct (please note that 2.0 works for 3.0 and 3.5 since they are addons....so long as these are installed on the server)
Apr 16 '09 #13
I went back and grabbed an older copy of the website and put it on. That seems to be working. I haven't figure out what I am doing wrong with the newer version but this should work for now.

Thank You for your time and patience
Apr 16 '09 #14
Frinavale
9,735 Expert Mod 8TB
Are you using newer DLLs in the newest version of your website?
Are they installed on the server?
Apr 16 '09 #15
Nope, no new dlls. No new pages. Only changes to existing pages and updating the web.config with connection strings to a different database. The database connection is working for the original changes, just not for when I copy it to a different folder.
Apr 18 '09 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Han | last post by:
Has any one ran into this problem? I'm trying to debug an error on a remote ASP.NET server. I've set <customErrors mode = "Off"> in the web.config but it does not give a detailed, non-filtered...
4
by: Julia | last post by:
Hi, I have tried everything (at least everything I know) but it does not work I only get friendly errors I did set customErrors mode="Off" in all web condig files Any one have an idea?!?
21
by: nicholas | last post by:
Although in my web.config I have <customErrors mode="off" /> I still get no detailed errors. How comes ? THX This is what I get: Server Error in '/mywebfolder'Application.
1
by: Menno Abbink | last post by:
Hey All, I'm developing a new website and I want the customer to be able to se my work in progress so I have set up a server behind my ADSL-router. The server is using W2003. I've created a...
1
by: Savas Ates | last post by:
I have a web application It works well in my local fodler.. When i upload it to my web server i got To enable the details of this specific error message to be viewable on remote machines, please...
5
by: Savas Ates | last post by:
I have a web application It works well in my local folder.. When i upload it to my web server i got To enable the details of this specific error message to be viewable on remote machines,...
3
by: =?Utf-8?B?bmt3?= | last post by:
I want to use <customErrors mode="Off"/in the web.config file; but I want to have custom error message for database time out error message. Is it possible?
2
by: moondog | last post by:
I have just upgraded from Visual Studio 2003 to 2005 and am now trying to make my web apps work. My web app compiles and works fine in Visual Studio but once I publish it out to my server (which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.