473,324 Members | 2,417 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,324 software developers and data experts.

Security Exception with no cause...

OK, I know there has to be a cause, but I can't find it. My application
writes error information to a .log file located on the site. Most of the
time, this works with no problem using FSO. However, in one particular
module, it will not write. I gets the Security.SecurityException error. All
permissions are set correctly through IIS and Windows to allow access. Like I
said, though, it works from some modules but not this one. The code to write
error info is identical in all instances of use and for some reason this one
just can't do it. Any help would be greatly appreciated. Here is a bit of the
code:

f = fso.OpenTextFile(epth, IOMode.ForAppending, True)
f.WriteLine("[" & DateString & "][" & TimeString &
"]|;|hs.aspx->Page_Load->Line " & Err.Erl & "|;|Error " & Err.Number & ": " &
Err.Description)
f.Close()
Response.Redirect("/hsp/error/100.htm", True)

--

Tony Abate
Nov 19 '05 #1
1 858
your code is not thread safe, if two request write to the log at the same
time, one will fail.

-- bruce (sqlwork.com)
"Tony Abate" <no****@spam-b-gone.com> wrote in message
news:BD**********************************@microsof t.com...
OK, I know there has to be a cause, but I can't find it. My application
writes error information to a .log file located on the site. Most of the
time, this works with no problem using FSO. However, in one particular
module, it will not write. I gets the Security.SecurityException error.
All
permissions are set correctly through IIS and Windows to allow access.
Like I
said, though, it works from some modules but not this one. The code to
write
error info is identical in all instances of use and for some reason this
one
just can't do it. Any help would be greatly appreciated. Here is a bit of
the
code:

f = fso.OpenTextFile(epth, IOMode.ForAppending, True)
f.WriteLine("[" & DateString & "][" & TimeString &
"]|;|hs.aspx->Page_Load->Line " & Err.Erl & "|;|Error " & Err.Number & ":
" &
Err.Description)
f.Close()
Response.Redirect("/hsp/error/100.htm", True)

--

Tony Abate

Nov 19 '05 #2

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

Similar topics

1
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config ...
2
by: Robert A. van Ginkel | last post by:
I have a strange C# problem. Is the following a bug? Because it should be possible to run unsafe code. How can I accomplish this? And where can I read more about this, because documentation on this...
1
by: Nadav | last post by:
Hi, I am writing an Obfuscator to Obfuscate managed .NET assemblies, the obfuscator works with most of the assemblies I have tried, how ever, some assemblies ( such as nunit-gui.exe ) generate...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
0
by: Sam Fields | last post by:
I have found very little regarding the error "Unable to find an entry point named EnumerateSecurityPackagesW in DLL security.dll. ". I have an ASP.NET Web Service being accessed via SSL. I found...
1
by: Dave | last post by:
I am getting te following error in a ASP.Net app that is running on Win XP Pro (SP2): Server cannot access application directory 'C:\Documents and Settings\dave\My Documents\My Visual Studio...
2
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies...
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
5
by: VictorG | last post by:
Hello, I am trying to secure a webservice using WSE 3.0 and the turnkey usernameForCertificateSecurity profile. I am passing a valid username token, and on the server I have overridden the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.