Need to get my exception handler running on my web service.

I'm having a hard time getting my web service to write to a text file upon start-up.  I am getting an exception which I am trying to get a handle on, but first I need to get my exception handler working.

I called my ISP and found the path to the root directory on my website and use it when defining the filename to write a sample textfile to.  But it never gets created.

Any ideas?
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
surajgupthaCommented:
If you wanted to see the actual exception, just switch off custom exceptions in ur web.config file, that way you would see the reason the file isnt created.
0
 
newbiewebSr. Software EngineerAuthor Commented:
sounds interesting.  How do I turn it off?
0
 
newbiewebSr. Software EngineerAuthor Commented:
what shall I change?

        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
surajgupthaCommented:
Try removing the custom errors property or set mode as off
0
 
newbiewebSr. Software EngineerAuthor Commented:
How do I comment this out?  Like this?

       <!--customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors-->
0
 
newbiewebSr. Software EngineerAuthor Commented:
I think it was already commented out.  Here'e the original code:

        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
0
 
surajgupthaCommented:
When you run the page now, does it fail?
0
 
surajgupthaCommented:
What is the exception displayed?
Make sure that there is no CATCH block in ur code that might be supressing your exceptions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.