473,485 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error 70 : access denied


Hello,

Please anybody try to execute this code. I am having a "quick.html" with
email Id and name etc..., and henext form is the below "gdform.asp".

When i try to execute this i am getting the following error. Error 70 :
Access Denied.

Please anybody can help me.

Thanks in advance.
<%

Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value1
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")

host_url = Request.ServerVariables("HTTP_HOST")
response.write(host_url)

req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("ssfm")
dirname = filename
filename = filename & "\gdform_" & DatePart("M", dtNow) & DatePart("D",
dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S",
dtNow)

response.write(req_method)
response.write(dtnow)
response.write(filename)
response.write(dirname)

sub FormatVariableLine(byval var_name, byVal var_value)
Dim tmpStr
tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
tmpStr = tmpStr & var_value & vbCRLF
tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
FormatVariableLine = tmpStr
end sub

Sub OutputLine(byVal line)
outfile.WriteLine(line)
end sub

if err.number = 0 then
response.Write("<brError :" & err.number &"::"&err.description & filename)
Set outfile = fso.CreateTextFile(filename, true)
response.Write(filename)
if err.number <0 then
bErr = true
response.Write("<brError :" & err.number &"::"&err.description)
errStr = "Error creating file! Directory may not be writable or may not
exist.<br>Unable to process request."
else
response.write("gaffar")
if(req_method = "GET") then
for each Item in request.QueryString
if item <"" then
bEmpty = false
key = item
value1 = Request.QueryString(item)
if(lcase(key) = "redirect") then
landing_page = value1
else
line = FormatVariableLine(key, value1)
Call OutputLine(line)
end if
end if
next
elseif (req_method = "POST") then
for each Item in request.form
if item <"" then
bEmpty = false
key = item
value1 = Request.form(item)
if(lcase(key) = "redirect") then
landing_page = value1
else
line = FormatVariableLine(key, value1)
Call OutputLine(line)
end if
end if
next
end if
outfile.close
end if
if(bEmpty = true) AND errStr = "" then
bErr = true
errStr = errStr & "<br>No variables sent to form! Unable to process
request."
end if
if(bErr = false) then
if (landing_page <"") then
response.Redirect "http://" & host_url & "/" & landing_page
else
response.Redirect "http://" & host_url
end if
else
Response.Write errStr
end if
set fso = nothing
else
Response.Write " An Error Occurred creating mail message. Unable to
process form request at this time."
end if
%>
Sep 5 '06 #1
1 4568
Shun wrote:
When i try to execute this i am getting the following error.
Error 70 : Access Denied.
You don't state which line the error occurs on, so I will guess. It has to
be one of these:
Set fso = Server.CreateObject("Scripting.FileSystemObject")
filename = Server.MapPath("ssfm")
outfile.WriteLine(line)
Set outfile = fso.CreateTextFile(filename, true)
outfile.close
In all likelihood, you need to grant some file-level permissions to your
SYSTEM or IUSR_xxx account.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Sep 5 '06 #2

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

Similar topics

22
3199
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
5
2930
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times...
2
2202
by: Ross | last post by:
Hi I have an application using asp.net that I am running on my PC. The web form has a text box where you can enter a name for a new Photo category then click on the button. The code is...
9
3183
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
7
4757
by: Martin Strojek | last post by:
Hi, I have the following problem with developing some web site. I use Visual Studio 2003 to build a website. I tried Windows 2003 Server and switched now back to Windows XP with PWS but the...
0
1585
by: Gururaj Badam | last post by:
I get the following access denied error when i try to export an image Start of Error Message Access Denied. Description: An unhandled exception has occurred during the execution of the...
0
2240
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
1
3678
by: lecnac | last post by:
Sorry for the repost. I must have done something wrong when I tried to post my reply (I can't seem to find it). Anyway, I'd really appreciate any help that anyone could provide. My issue is...
1
4173
by: Atia Amin | last post by:
Hi, I am a new member. Hello to every one. I am new in ASP.NET area. I wrote an ASP.NET web application which was running ok with my old laptop. Currently I have given a new laptop. Now I copied...
2
2045
by: stephen | last post by:
Hi, I am getting an Error "Access to the path...... is denied" Error. I have an web app and I am creating a log file to write the error info. If I have the absolute path...
0
6960
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...
1
6825
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...
0
7275
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...
1
4857
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...
0
4551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
247
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...

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.