Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - FolderExists and UNC path

Reply
 
Old 07-23-2008   #1 (permalink)
cschmid


 
 

FolderExists and UNC path

Hi All,

I have the follow situation:


In may Server A i have test asp page with the following code


<%
mImportDirectory = "\\BAIVMAST3\cvmData$"
set fso = Server.CreateObject("Scripting.FileSystemObject")
response.write mImportDirectory"="&fso.FolderExists(mImportDirectory)
%>


when I test the page into the server with my user, the result of
FolderExists is "True", but when I test it from another PC (not the
server), the result is "False".


The share permissions and the security permissions on \
\BAIVMAST3\cvmData$ is everybody fullcontrol.


The IIS site is seted to use the Integrated Windows security, so in
both case my username of windows was used.


Any idea?


Thanks

My System SpecsSystem Spec
Old 07-23-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: FolderExists and UNC path


<cschmid@xxxxxx> wrote in message
news:d24db7dc-8b7c-4b0c-b2cb-8671726f9d7e@xxxxxx
Quote:

> Hi All,
>
> I have the follow situation:
>
>
> In may Server A i have test asp page with the following code
>
>
> <%
> mImportDirectory = "\\BAIVMAST3\cvmData$"
> set fso = Server.CreateObject("Scripting.FileSystemObject")
> response.write mImportDirectory"="&fso.FolderExists(mImportDirectory)
> %>
>
>
> when I test the page into the server with my user, the result of
> FolderExists is "True", but when I test it from another PC (not the
> server), the result is "False".
>
>
> The share permissions and the security permissions on \
> \BAIVMAST3\cvmData$ is everybody fullcontrol.
>
>
> The IIS site is seted to use the Integrated Windows security, so in
> both case my username of windows was used.
>
>
> Any idea?
>
>
> Thanks
What happens when you type these commands from a Command Prompt?

dir \\BAIVMAST3\cvmData$
if exist \\BAIVMAST3\cvmData$ (echo Folder found) else (echo Folder not
found)


My System SpecsSystem Spec
Old 07-23-2008   #3 (permalink)
Claudio


 
 

Re: FolderExists and UNC path

Hi,

When I ran this command from the server logged with my user it
works, when I ran this command form my PC too.
The problem is when I ran the asp page from my PC using an Internet
Explorer.

I post the problem here, (not in the ASP group) becouse I think
that the problem is related to vbscript code or permissions.

Thanks

On 23 jul, 11:54, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:
Quote:

> <csch...@xxxxxx> wrote in message
>
> news:d24db7dc-8b7c-4b0c-b2cb-8671726f9d7e@xxxxxx
>
>
>
>
>
Quote:

> > Hi All,
>
Quote:

> > *I have the follow situation:
>
Quote:

> > *In may Server A i have test asp page with the following code
>
Quote:

> > <%
> > mImportDirectory = "\\BAIVMAST3\cvmData$"
> > set fso = Server.CreateObject("Scripting.FileSystemObject")
> > response.write mImportDirectory"="&fso.FolderExists(mImportDirectory)
> > %>
>
Quote:

> > when I test the page into the server with my user, the result of
> > FolderExists is "True", but when I test it from another PC (not the
> > server), the result is "False".
>
Quote:

> > The share permissions and the security permissions on \
> > \BAIVMAST3\cvmData$ is everybody fullcontrol.
>
Quote:

> > The IIS site is seted to use the Integrated Windows security, so in
> > both case my username of windows was used.
>
Quote:

> > Any idea?
>
Quote:

> > Thanks
>
> What happens when you type these commands from a Command Prompt?
>
> dir \\BAIVMAST3\cvmData$
> if exist \\BAIVMAST3\cvmData$ (echo Folder found) else (echo Folder not
> found)- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -
My System SpecsSystem Spec
Old 07-24-2008   #4 (permalink)
Joe Fawcett


 
 

Re: FolderExists and UNC path

Traditionally ASP uses the IUSR_<machinename> account so try mapping a drive
using that username and password or assigning permissions to that account or
changing to a different one if you don't know or can't change the password.
(It's also difficult giving permissions on a remote machine to a local
account, you need to create one on the remote machine with identical name
and password.)
When you've sorted out what's happening you can decide how to proceed
bearing in mind that giving the ASP account higher privileges can be
dangerous from a security stand point.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

"Claudio" <cschmid@xxxxxx> wrote in message
news:c7254eff-d666-4bc7-93aa-1008b53ce5ad@xxxxxx
Quote:

> Hi,
>
> When I ran this command from the server logged with my user it
> works, when I ran this command form my PC too.
> The problem is when I ran the asp page from my PC using an Internet
> Explorer.
>
> I post the problem here, (not in the ASP group) becouse I think
> that the problem is related to vbscript code or permissions.
>
> Thanks
>
> On 23 jul, 11:54, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:
Quote:

>> <csch...@xxxxxx> wrote in message
>>
>> news:d24db7dc-8b7c-4b0c-b2cb-8671726f9d7e@xxxxxx
>>
>>
>>
>>
>>
Quote:

>> > Hi All,
>>
Quote:

>> > I have the follow situation:
>>
Quote:

>> > In may Server A i have test asp page with the following code
>>
Quote:

>> > <%
>> > mImportDirectory = "\\BAIVMAST3\cvmData$"
>> > set fso = Server.CreateObject("Scripting.FileSystemObject")
>> > response.write mImportDirectory"="&fso.FolderExists(mImportDirectory)
>> > %>
>>
Quote:

>> > when I test the page into the server with my user, the result of
>> > FolderExists is "True", but when I test it from another PC (not the
>> > server), the result is "False".
>>
Quote:

>> > The share permissions and the security permissions on \
>> > \BAIVMAST3\cvmData$ is everybody fullcontrol.
>>
Quote:

>> > The IIS site is seted to use the Integrated Windows security, so in
>> > both case my username of windows was used.
>>
Quote:

>> > Any idea?
>>
Quote:

>> > Thanks
>>
>> What happens when you type these commands from a Command Prompt?
>>
>> dir \\BAIVMAST3\cvmData$
>> if exist \\BAIVMAST3\cvmData$ (echo Folder found) else (echo Folder not
>> found)- Ocultar texto de la cita -
>>
>> - Mostrar texto de la cita -
>
My System SpecsSystem Spec
Old 07-25-2008   #5 (permalink)
Claudio


 
 

Re: FolderExists and UNC path

Hi Joe,

When I test my page into the server I am using my own network user
and when I test it from my PC machine too, so the security configured
in the IIS and the security of the shared folder is not the problem.
In both situation the result is diferent, in the first situation,
the page give me "true" as result, and the other give me "false".

Claudio

On Jul 24, 4:08*am, "Joe Fawcett" <joefawc...@xxxxxx> wrote:
Quote:

> Traditionally ASP uses the IUSR_<machinename> account so try mapping a drive
> using that username and password or assigning permissions to that accountor
> changing to a different one if you don't know or can't change the password.
> (It's also difficult giving permissions on a remote machine to a local
> account, you need to create one on the remote machine with identical name
> and password.)
> When you've sorted out what's happening you can decide how to proceed
> bearing in mind that giving the ASP account higher privileges can be
> dangerous from a security stand point.
>
> --
>
> Joe Fawcett (MVP - XML)http://joe.fawcett.name
>
> "Claudio" <csch...@xxxxxx> wrote in message
>
> news:c7254eff-d666-4bc7-93aa-1008b53ce5ad@xxxxxx
>
>
>
Quote:

> > Hi,
>
Quote:

> > * When I ran this command from the server logged with my user it
> > works, when I ran this command form my PC too.
> > * The problem is when I ran the asp page from my PC using an Internet
> > Explorer.
>
Quote:

> > * I post the problem here, (not in the ASP group) becouse I think
> > that the problem is related to vbscript code or permissions.
>
Quote:

> > Thanks
>
Quote:

> > On 23 jul, 11:54, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:
Quote:

> >> <csch...@xxxxxx> wrote in message
>
Quote:
Quote:

> >>news:d24db7dc-8b7c-4b0c-b2cb-8671726f9d7e@xxxxxx
>
Quote:
Quote:

> >> > Hi All,
>
Quote:
Quote:

> >> > I have the follow situation:
>
Quote:
Quote:

> >> > In may Server A i have test asp page with the following code
>
Quote:
Quote:

> >> > <%
> >> > mImportDirectory = "\\BAIVMAST3\cvmData$"
> >> > set fso = Server.CreateObject("Scripting.FileSystemObject")
> >> > response.write mImportDirectory"="&fso.FolderExists(mImportDirectory)
> >> > %>
>
Quote:
Quote:

> >> > when I test the page into the server with my user, the result of
> >> > FolderExists is "True", but when I test it from another PC (not the
> >> > server), the result is "False".
>
Quote:
Quote:

> >> > The share permissions and the security permissions on \
> >> > \BAIVMAST3\cvmData$ is everybody fullcontrol.
>
Quote:
Quote:

> >> > The IIS site is seted to use the Integrated Windows security, so in
> >> > both case my username of windows was used.
>
Quote:
Quote:

> >> > Any idea?
>
Quote:
Quote:

> >> > Thanks
>
Quote:
Quote:

> >> What happens when you type these commands from a Command Prompt?
>
Quote:
Quote:

> >> dir \\BAIVMAST3\cvmData$
> >> if exist \\BAIVMAST3\cvmData$ (echo Folder found) else (echo Folder not
> >> found)- Ocultar texto de la cita -
>
Quote:
Quote:

> >> - Mostrar texto de la cita -- Hide quoted text -
>
> - Show quoted text -
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Faster way to do '.FolderExists' ? VB Script
split-path -> unc-path PowerShell
BUG? (Test-Path $path -IsValid) and empty $path PowerShell
BUG/ANNOYANCE: PoSH autocompletes the full path rather than a minimal path PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46