473,385 Members | 1,655 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.

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

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
2 1376
> 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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott J. Chlebove | last post by:
I am running a PL/SQL module in which I do the following.... BEGIN DBMS_OUTPUT.enable(1000000); -- Open file for writing. OutfileHandler1 := UTL_FILE.FOPEN(wc_file_path, wc_output_file1,...
0
by: Sumit Pokhariyal | last post by:
Hi, I am trying to deploy the Exception Management Application Block Assemblies as Shared Assemblies using GAC. I have deployed these assemblies (Exception Management assembly and its Interface...
6
by: Kevin Jackson | last post by:
Let's say we log exceptions to the windows application event log using the Exception Management Application Block. Is there a pattern that can be used so the exception is logged only once and not...
4
by: Peter Aitken | last post by:
It seems that some classes have their own exception handling built in. For example if I try to use FileStream to open a file that does not exist, my Try...Catch block seems to be ignored and...
2
by: Sri | last post by:
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...
5
by: Alan Silver | last post by:
Hello, I have a page that is supposed to do some checking, and if OK, set a session variable before redirecting to another page. The following code is a simplified version, I have hard-coded the...
7
by: puginews | last post by:
I was wondering when you create a new xmltextreader (or any other object for that matter), is it destroyed/closed (memory/resources freed) when an exception occurs ? Dim xmlrdr As New...
4
by: Sunil Varma | last post by:
Hi, Here is a piece of code where the constructor throws an exception. class A { int n; public: A() try{
9
by: TC | last post by:
Hey All, I posted this to the Crypto users group and forgot to add the VB.Net users group. I apologize for any confusion. I have been testing a try / catch / finally block and purposely...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.