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

Microsoft Exception Block problem with creating a text file in .net

P: n/a
Sri
I have a simple Web Application hosted on IIS. In this appliaction I
am trying to use Microsoft Exception Blocks. It is giving giving me
some problem in creating a file on the path specified in my
web.config. I tried giving different paths but didnt get any success.
The web.config looks like:
<configSections>
<section name="exceptionManagement"
type="Microsoft.ApplicationBlocks.ExceptionManagem ent.ExceptionManagerSectionHandler,
Microsoft.ApplicationBlocks.ExceptionManagement" />
</configSections>

<exceptionManagement mode="on">
<publisher assembly="TestWeb"
type="TestWeb.ExceptionPublisher" FileName="D:\WebErrorLog.txt" />
<!-- also tried D:\\WebErrorLog.txt -->
</exceptionManagement>

I am able to read web.config but the ExceptionPublisher class throws
an exception "Access to the path D:\WebErrorLog.txt is Denied.

My OS is WinXP, .net framework 1.1. Please give me some solution as
its needed in urgent basis. This approach works fine in windows form
not in web form... very weird. Thanks in advance.
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> I am able to read web.config but the ExceptionPublisher class throws
an exception "Access to the path D:\WebErrorLog.txt is Denied.

My OS is WinXP, .net framework 1.1. Please give me some solution as
its needed in urgent basis. This approach works fine in windows form
not in web form... very weird. Thanks in advance.


You must ensure that the user account the ASP.NET application runs as has
sufficient rights to access the file. Unless you have change the security
settings, your application runs as ASPNET on Windows XP.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
Jul 21 '05 #2

P: n/a

thanks a lot for the reply. I was able to solve it with the same
solution u gave. thanks a lot.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.