473,322 Members | 1,501 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,322 software developers and data experts.

permission to write to a log file

hi

i used the below code in my application

Dim logFile As New FileInfo(path)
Dim logStreamWriter As StreamWriter

If logFile.Exists = True Then
logStreamWriter = logFile.AppendText
logStreamWriter.WriteLine(logMessage)
Else
logStreamWriter = logFile.CreateText
logStreamWriter.WriteLine(logMessage)
End If

but i run time i get an error saying access is denied and i dont have such
permission
so haw can i pass that problem, this application will be installed on many
pc's with different users and passwords

thank you
--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
Jun 27 '08 #1
1 912
sorry i forgot to say i use this code to write the exception messahe that
might be thrown to a log text file
--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
"Pure Heart" wrote:
hi

i used the below code in my application

Dim logFile As New FileInfo(path)
Dim logStreamWriter As StreamWriter

If logFile.Exists = True Then
logStreamWriter = logFile.AppendText
logStreamWriter.WriteLine(logMessage)
Else
logStreamWriter = logFile.CreateText
logStreamWriter.WriteLine(logMessage)
End If

but i run time i get an error saying access is denied and i dont have such
permission
so haw can i pass that problem, this application will be installed on many
pc's with different users and passwords

thank you
--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lawrence | last post by:
I wrote some code that let me upload a file to my server. Then I wrote some code to let me delete the file. But when I try to delete, I get this error: Warning: Unlink failed (Permission denied)...
7
by: John | last post by:
I can write to this textfile: $fp = fopen("./testfile.txt","w"); but not this html file: $fp = fopen("./testfile.html","w"); How do I get permission to write to a html file?
9
by: bird | last post by:
What can cause the PHP code fopen("filename","a") to fail with permission denied message as below? ------------------ Warning: fopen(filename): failed to open stream: Permission denied in...
1
by: letkok | last post by:
Help! When I run the VB program in test mode while looking at the code, it functions correctly and creates the desired file. When I compile it on the server and try to have it run from the...
11
by: Richard Muller | last post by:
Hi, I new to ASP. I have a problem with an ASP script opening a file for writing on my server. Here's how I got to this error: I downloaded a neat FileUpload ASP example from...
4
by: Brent Bigler | last post by:
The computer: W2K server, domain controller, Microsoft.Net Framework 1.1 ======================== The error message: Access to the path "c:\fanmail\newfiles" is denied .... Exception...
1
by: Asha | last post by:
greetings, i have no permission to save my xml value into the xml file how can i over come all this. i've already right clickon the folder and file to make sure that its not in read nly mode. any...
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
6
by: news.microsoft.com | last post by:
Hope someone can help Working Visual Web Developer 2005 using Access databases It all works fine using the WebDevelopers webserver but when I use IIS I get these errors The Microsoft Jet...
3
by: unauthorized | last post by:
I'm running a PHP 5.1 on an Apache 2.2 server under Windows XP which I use to develop my web apps. Currently, I am trying to add "upload" functionality to my project, but for some reason, when the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.