By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,336 Members | 2,307 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,336 IT Pros & Developers. It's quick & easy.

.NET question about the customErrors Tag

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.