473,239 Members | 1,498 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,239 software developers and data experts.

.NET question about the customErrors Tag

A few (not all) of my clients are getting this error with a web thumbnail generator code I wrote

=============================
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>
====================================

Some of them solved this issue by granting the ASPNET user full control on the application root folder, but some of them cannot get it to work at all

My code does the following thing

1) take file path from a querystrin
2) generate thumbnai
3) save thumbnail in a folder (there is a try..catch block here to make sure the ASPNET user has permission to save file
4) response.writefile the saved thumbnail to browse

Most users don't have this issue. Please let me know what might be the cause and what I can tell my clients to try

Thanks
Nov 18 '05 #1
6 1453
CT
If you have access to the locals erver nachine, you could see the exact
error output, including the offending line. If not, create the customErrors
tag as suggested (temporarily) and see the error description in any browser.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Samuel" <pr********@asppg.net> wrote in message
news:AC**********************************@microsof t.com...
A few (not all) of my clients are getting this error with a web thumbnail
generator code I wrote:

==============================
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>
=====================================

Some of them solved this issue by granting the ASPNET user full control on
the application root folder, but some of them cannot get it to work at
all.

My code does the following thing:

1) take file path from a querystring
2) generate thumbnail
3) save thumbnail in a folder (there is a try..catch block here to make
sure the ASPNET user has permission to save file)
4) response.writefile the saved thumbnail to browser

Most users don't have this issue. Please let me know what might be the
cause and what I can tell my clients to try.

Thanks

Nov 18 '05 #2
Hi Samuel,

The <customErrors> element in asp.net's web.config file can help configure
how the client will view the web application's unhandled exception/error
info. By default, the mode is "RemoteOnly" which means only local client
can view the detailed info. So if you want other client also view the
detailed error info, you can set the mode as "Off". You can view the
following reference for detailed info:

#<customErrors> Element
http://msdn.microsoft.com/library/en...tomerrorsSecti
on.asp?frame=true

In addition, I think you can also have a look at the asp.net's trace which
can also helpf troubleshooting your web application's issue:

#ASP.NET Trace
http://msdn.microsoft.com/library/en...efunctionality
.asp?frame=true

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Hi Samuel,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Thanks Steven for your reply. I have a few questions

1) the software must be working because the majority of my clients don't have this issue.. Could this be a permission issue that needs to be done on the clients server

2) We do not use web.config file because the software is not configured as an application (not required). Will it work if I add an web.config file to the site's root directory? The software is installed in a folder called /gallery/ (not an application), and I am not sure if adding a web.config file to the root (/) directory will help. I dont have access to my client's server

Thanks!
Nov 18 '05 #5
Hi Samuel,

Thanks for the followup. To answer your questions:

1) the software must be working because the majority of my clients don't
have this issue.. Could this be a permission issue that needs to be done on
the clients server?
================================================== ==========================
============
So far I'm also not very sure on it, we could only say it's a potential
cause. Have you try set the <customErrors>'s mode to "Off" and suggest the
user who encounter the error to post you the detailed error info? I think
that may help provide some clues.

2) We do not use web.config file because the software is not configured as
an application (not required). Will it work if I add an web.config file to
the site's root directory? The software is installed in a folder called
/gallery/ (not an application), and I am not sure if adding a web.config
file to the root (/) directory will help. I dont have access to my client's
server.
================================================== ==========
Oh, now I got it that your application is in a sub folder under the root
applicatoin. If so, you'll be care to add a web.config because some
elements in the web.config is only allowed to be setting for and
application( which means the folder need to be configured as an application
in IIS) rather than a normal folder. Since you didn't provde a web.config
it'll derive the configuration from the Root Application(which may derive
from machine.config).

Also, still think the detailed error info is necessary for troubleshooting.
If you have any new findings, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #6
Hi Samuel,

Any progress on this issue? If you have any new findings or there is
anything else we can help, please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John Smith | last post by:
I am trying to implement custom error pages and I get this error message: **************************************************************************** ********...
10
by: Ron Weldy | last post by:
I am working on a website that someone else has set up. They have a web.config file with a customerrors element that points the error handling to a special aspx page. <customErrors...
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: Chumley Walrus | last post by:
I'm having trouble seeing my page when I publish it on my live server. I created a project in VS.net (with MMIT integrated), created a simple index.aspx mobilewebform page , I can see it in my...
6
by: SMG | last post by:
Hi , Sory for incomplete message in last post here is the actual problem.. I am using following code in web.confiig for trapping all the error through out my site.. <customErrors mode="On"...
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,...
2
by: Max Metral | last post by:
I'm trying to set the default behavior of customErrors in the machine.config. The documentation seems to suggest this should work, but it doesn't seem to work for me. On my development machine, I...
9
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it programatically possible in VB.NET to read the contents of web.config's <customErrorselement? I looked at using ConfigurationSettings.AppSettings, but that doesn't work. I need to...
0
by: baburk | last post by:
Hi, I want to use the <customErrors> for all <system.web></system.web> If error occure this should be called. I have to write it once not in every <system.web></system.web>. How can I?
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.