473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="exception Management"
type="Microsoft .ApplicationBlo cks.ExceptionMa nagement.Except ionManagerSecti onHandler,
Microsoft.Appli cationBlocks.Ex ceptionManageme nt" />
</configSections>

<exceptionManag ement mode="on">
<publisher assembly="TestW eb"
type="TestWeb.E xceptionPublish er" FileName="D:\We bErrorLog.txt" />
<!-- also tried D:\\WebErrorLog .txt -->
</exceptionManage ment>

I am able to read web.config but the ExceptionPublis her 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 1389
> I am able to read web.config but the ExceptionPublis her 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
3640
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, 'W'); -- output report -- Get the CUSTOMER records by reading the CUSTOMER table.
0
1872
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 assembly) into GAC using gacutil.exe /i command and also tried with MMC. Now after adding the references of these assemblies into my application,...
6
9948
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 everytime up through the call chain? Is there anything a caller can key off of to check to see if it should also log the exception?
4
1490
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 instead I get an error message that must be generated by the class itself. How can I tell which classes and which exceptions do not require explicit...
2
281
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 web.config. I tried giving different paths but didnt get any success. The web.config looks like: <configSections> <section...
5
2018
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 basket ID and removed a load of extra checking... public partial class GoToCheckout : Page { public void Page_Load(Object o, EventArgs e) { try...
7
1180
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 XmlTextReader(Me.Server.MapPath("staff.xml")) Try Do While xmlrdr.Read() Loop xmlrdr.Close() lblWellFormed.Text = "Well-Formed"
4
2901
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
1944
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 raising exceptions and I've noticed that if an exception of "Length of the data to decrypt is invalid." is raised with the CryptoStream object, later...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.