Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Work locally?

Reply
Thread Tools

Work locally?

 
 
Aaron
Guest
Posts: n/a
 
      09-12-2003
Hi,
I have included the following code in my asp page. It seems to work
fine on my localhost. However when i tried to access the page on other
pc in the network, the page could not be displayed, with the error msg
internal server error. Is it because the code that i added works only
locally and not on a server?

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("N:\Finance\Systems & Processes\S&P
Projects\Proj Finance Intranet Project - Eric\testing\")
Set fc = f.Files

For Each f1 in fc
set rs1 = Server.CreateObject("ADODB.recordset")
rs1.Open "Select SectionCode from Dept", conn, adOpenStatic
s = mid(f1.name,1,3)
do until rs1.eof
for each x in rs1.Fields
q2= x.value

If s = trim(q2) Then

set rs2 = Server.CreateObject("ADODB.recordset")
set rs3 = Server.CreateObject("ADODB.recordset")
rs2.Open "Select Department from Dept where (SectionCode = " & q2
& ")", conn, adOpenStatic
rs3.Open "Select Division from Dept where (SectionCode = " & q2 &
")", conn, adOpenStatic

Set fsoDepartment = CreateObject("Scripting.FileSystemObject")
Set fsoDivision = CreateObject("Scripting.FileSystemObject")

'check if the folder exist
If fsoDepartment.FolderExists("N:\Finance\Systems &
Processes\S&P Projects\Proj Finance Intranet Porject - Eric\"&
rs2.fields(0).value ) Then

If fsoDivision.FolderExists("N:\Finance\Systems &
Processes\S&P Projects\Proj Finance Intranet Porject - Eric\"&
rs2.fields(0).value & "\" & rs3.fields(0).value) Then
response.write("Division folder already exist." &"<BR>")
Else
fsoDivision.CreateFolder("N:\Finance\Systems &
Processes\S&P Projects\Proj Finance Intranet Porject - Eric\" &
rs2.fields(0).value & "\" & rs3.fields(0).value)
End If
 
Reply With Quote
 
 
 
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      09-12-2003
> internal server error.

See http://www.aspfaq.com/2109

> Set f = fso.GetFolder("N:\Finance\


See http://www.aspfaq.com/2168


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE;Kontki if you delete kontiki any program you loaded with it in it 'will not work I have tried it with three programs and none work anymore (if you se it just stop download) 1-Twitch Computer Support 5 04-23-2009 02:45 PM
MS work around on text wrapping in a datagrid does not work TB ASP .Net 2 02-22-2006 10:34 PM
Hi I am new to asp i can not get it to work on xp pro sp2 even though the localhost work but asp pages dont so can some one help craig dicker ASP .Net 9 07-07-2005 11:52 AM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 12:07 PM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 06:24 AM



Advertisments