If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Getting Error while creating a file in VB dll and using in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-03, 14:53
aravind741 aravind741 is offline
Registered User
 
Join Date: Jun 2002
Posts: 8
Unhappy Getting Error while creating a file in VB dll and using in ASP

Hello Gurus,
I have a class and I have a function/method with 4 parameters. first 3 are input and the last one is output.
I am creating a file at "C:\" based on the input parameters and writing the records to the file.
I tested this class from a VB project and the file is created successfully.

Now I created a DLL using the Class and I am using this DLL in an ASP. I pass 3 input parameters and one output parameter variable. What I get is an error ( which I did not get when the class was run in the VB project) like Path/File Access Error (Error75). Can any of you guys see why I am getting this error when I try to execute the DLL from ASP but works fine in VB project when used as a class??


Code:


Dim fso
Dim txtfile
Dim ts
Set fso = CreateObject("Scripting.FileSystemObject")
Const forreading = 1, forwriting = 2, forappending = 3

If fso.FileExists(cfilname) Then
Kill cfilname
End If

fso.CreateTextFile cfilname

Set txtfile = fso.GetFile(cfilname)
Set ts = txtfile.OpenAsTextStream(forwriting, 0)
strrec = '1212121'
ts.WriteLine strrec
strrec = '2323231'
ts.WriteLine strrec
ts.close
Reply With Quote
  #2 (permalink)  
Old 03-14-03, 11:48
pjames pjames is offline
Registered User
 
Join Date: Jan 2003
Posts: 23
Does The IIS account have permissions to this directory? In other words does the IWAM account have permissions?

Last edited by pjames; 03-14-03 at 11:51.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On