472,090 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,090 software developers and data experts.

Accessing public folder on clilent machine

Hi everyone,
I Hope that someone will be able to give me a hint to the solution to my
problem.
I have developed a web service (vb.net) that needs to access the folders /
files and copy files to and from the public folder on the client machine.
It is not a public web service, only accessible on intranet.
The anonymous access is disabled.
Windows authentication is enabled.
Web.Config sets <identity impersonate="true" />
Using a test app, I call the web method and provide a file name with full
path (that resides in a public folder on my machine, the client machine) as
an argument among others. The web method tries to verify the existence of the
file, before doing a copy operation, by calling FileInfo.Exists method. The
method returns false and therefore the operation could not proceed normally.
However, if I logon to the web server and use IE to call the same method,
the web method verifies the existence of the same file on MY machine (which
is not the client machine in this case) and thus completes intended operation
normally.
And one of my colleagues can do the same from his machine using his login
i.e. he can logon to the server, bring up IE and call the web method with
same file name that resides on MY machine and the web method completes
normally.
What do I need to do, when I use my test application, to enable web method
access the public folder / file on a machine on the network?
Thanks a lot
Nov 23 '05 #1
5 2677
The process running your web services on the server should at least have
read permission to the file, and it must be UNC path, e.g.
\\clientmachine\C$\myfile.txt, not local path .
BTW I strongly suggest to use Attachment for the web services, WSE
toolkit provides very strong support for attacment.

Regards
Erymuzuan Mustapa

Khalique wrote:
Hi everyone,
I Hope that someone will be able to give me a hint to the solution to my
problem.
I have developed a web service (vb.net) that needs to access the folders /
files and copy files to and from the public folder on the client machine.
It is not a public web service, only accessible on intranet.
The anonymous access is disabled.
Windows authentication is enabled.
Web.Config sets <identity impersonate="true" />
Using a test app, I call the web method and provide a file name with full
path (that resides in a public folder on my machine, the client machine) as
an argument among others. The web method tries to verify the existence of the
file, before doing a copy operation, by calling FileInfo.Exists method. The
method returns false and therefore the operation could not proceed normally.
However, if I logon to the web server and use IE to call the same method,
the web method verifies the existence of the same file on MY machine (which
is not the client machine in this case) and thus completes intended operation
normally.
And one of my colleagues can do the same from his machine using his login
i.e. he can logon to the server, bring up IE and call the web method with
same file name that resides on MY machine and the web method completes
normally.
What do I need to do, when I use my test application, to enable web method
access the public folder / file on a machine on the network?
Thanks a lot

Nov 23 '05 #2
Thnaks for your input.
I specify the path like this:
\\mypc\public\testfile.txt
The 'public' folder on 'mypc' is a shared folder and accessible by Everyone.
The is evident from the fact that another user logged on to the server can
check the existance of this file on 'mypc' without having any special rights
on 'mypc' or the 'testfile.txt'.
I have not studied the WSE yet but I will start now. Any further hints how
attachments work under WSE?
Do the user of the web service need to have WSE on thier machines?
Khalique
"Erymuzuan Mustapa" wrote:
The process running your web services on the server should at least have
read permission to the file, and it must be UNC path, e.g.
\\clientmachine\C$\myfile.txt, not local path .
BTW I strongly suggest to use Attachment for the web services, WSE
toolkit provides very strong support for attacment.

Regards
Erymuzuan Mustapa

Khalique wrote:
Hi everyone,
I Hope that someone will be able to give me a hint to the solution to my
problem.
I have developed a web service (vb.net) that needs to access the folders /
files and copy files to and from the public folder on the client machine.
It is not a public web service, only accessible on intranet.
The anonymous access is disabled.
Windows authentication is enabled.
Web.Config sets <identity impersonate="true" />
Using a test app, I call the web method and provide a file name with full
path (that resides in a public folder on my machine, the client machine) as
an argument among others. The web method tries to verify the existence of the
file, before doing a copy operation, by calling FileInfo.Exists method. The
method returns false and therefore the operation could not proceed normally.
However, if I logon to the web server and use IE to call the same method,
the web method verifies the existence of the same file on MY machine (which
is not the client machine in this case) and thus completes intended operation
normally.
And one of my colleagues can do the same from his machine using his login
i.e. he can logon to the server, bring up IE and call the web method with
same file name that resides on MY machine and the web method completes
normally.
What do I need to do, when I use my test application, to enable web method
access the public folder / file on a machine on the network?
Thanks a lot

Nov 23 '05 #3
Hello Khalique,
In your proxy class in yr test application you need to set the Credentials.

// Obtain password from a secure store.
String SecurelyStoredPassword = "bla bla";

// Set the client-side credentials using the Credentials property.
ICredentials credentials = new NetworkCredential("Joe",SecurelyStoredPassword,"my domain");
serviceproxy.Credentials = credentials;

And then make your call.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Thnaks for your input.
I specify the path like this:
\\mypc\public\testfile.txt
The 'public' folder on 'mypc' is a shared folder and accessible by
Everyone.
The is evident from the fact that another user logged on to the server
can
check the existance of this file on 'mypc' without having any special
rights
on 'mypc' or the 'testfile.txt'.
I have not studied the WSE yet but I will start now. Any further hints
how
attachments work under WSE?
Do the user of the web service need to have WSE on thier machines?
Khalique
"Erymuzuan Mustapa" wrote:
The process running your web services on the server should at least
have
read permission to the file, and it must be UNC path, e.g.
\\clientmachine\C$\myfile.txt, not local path .
BTW I strongly suggest to use Attachment for the web services, WSE
toolkit provides very strong support for attacment.
Regards
Erymuzuan Mustapa
Khalique wrote:
Hi everyone,
I Hope that someone will be able to give me a hint to the solution
to my
problem.
I have developed a web service (vb.net) that needs to access the
folders /
files and copy files to and from the public folder on the client
machine.
It is not a public web service, only accessible on intranet.
The anonymous access is disabled.
Windows authentication is enabled.
Web.Config sets <identity impersonate="true" />
Using a test app, I call the web method and provide a file name with
full
path (that resides in a public folder on my machine, the client
machine) as
an argument among others. The web method tries to verify the
existence of the
file, before doing a copy operation, by calling FileInfo.Exists
method. The
method returns false and therefore the operation could not proceed
normally.
However, if I logon to the web server and use IE to call the same
method,
the web method verifies the existence of the same file on MY machine
(which
is not the client machine in this case) and thus completes intended
operation
normally.
And one of my colleagues can do the same from his machine using his
login
i.e. he can logon to the server, bring up IE and call the web method
with
same file name that resides on MY machine and the web method
completes
normally.
What do I need to do, when I use my test application, to enable web
method
access the public folder / file on a machine on the network?
Thanks a lot

Nov 23 '05 #4
I am setting the credentials in my test application (main form class of a
windows app) like this
Dim vs As VaultService = New VaultService
vs.Credentials = System.Net.CredentialCache.DefaultCredentials
And I have no problem with authentication. I have few other web methods that
I can call and get the results back e.g. data retrieved from sql server by a
sql query; orca test method that returns the user as authenticated by the
server. However, these methods do not attempt to access a shared folder on a
different machine.
(In my original post I described three different ways of accessing my web
service that I have tried.)
Thanks
Khalique
"Dilip Krishnan" wrote:
Hello Khalique,
In your proxy class in yr test application you need to set the Credentials.

// Obtain password from a secure store.
String SecurelyStoredPassword = "bla bla";

// Set the client-side credentials using the Credentials property.
ICredentials credentials = new NetworkCredential("Joe",SecurelyStoredPassword,"my domain");
serviceproxy.Credentials = credentials;

And then make your call.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Thnaks for your input.
I specify the path like this:
\\mypc\public\testfile.txt
The 'public' folder on 'mypc' is a shared folder and accessible by
Everyone.
The is evident from the fact that another user logged on to the server
can
check the existance of this file on 'mypc' without having any special
rights
on 'mypc' or the 'testfile.txt'.
I have not studied the WSE yet but I will start now. Any further hints
how
attachments work under WSE?
Do the user of the web service need to have WSE on thier machines?
Khalique
"Erymuzuan Mustapa" wrote:
The process running your web services on the server should at least
have
read permission to the file, and it must be UNC path, e.g.
\\clientmachine\C$\myfile.txt, not local path .
BTW I strongly suggest to use Attachment for the web services, WSE
toolkit provides very strong support for attacment.
Regards
Erymuzuan Mustapa
Khalique wrote:

Hi everyone,
I Hope that someone will be able to give me a hint to the solution
to my
problem.
I have developed a web service (vb.net) that needs to access the
folders /
files and copy files to and from the public folder on the client
machine.
It is not a public web service, only accessible on intranet.
The anonymous access is disabled.
Windows authentication is enabled.
Web.Config sets <identity impersonate="true" />
Using a test app, I call the web method and provide a file name with
full
path (that resides in a public folder on my machine, the client
machine) as
an argument among others. The web method tries to verify the
existence of the
file, before doing a copy operation, by calling FileInfo.Exists
method. The
method returns false and therefore the operation could not proceed
normally.
However, if I logon to the web server and use IE to call the same
method,
the web method verifies the existence of the same file on MY machine
(which
is not the client machine in this case) and thus completes intended
operation
normally.
And one of my colleagues can do the same from his machine using his
login
i.e. he can logon to the server, bring up IE and call the web method
with
same file name that resides on MY machine and the web method
completes
normally.
What do I need to do, when I use my test application, to enable web
method
access the public folder / file on a machine on the network?
Thanks a lot


Nov 23 '05 #5
Hello Khalique,

You need to make sure that the users who need to access that share have
the required permissions

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I am setting the credentials in my test application (main form class
of a
windows app) like this
Dim vs As VaultService = New VaultService
vs.Credentials = System.Net.CredentialCache.DefaultCredentials
And I have no problem with authentication. I have few other web
methods that
I can call and get the results back e.g. data retrieved from sql
server by a
sql query; orca test method that returns the user as authenticated by
the
server. However, these methods do not attempt to access a shared
folder on a
different machine.
(In my original post I described three different ways of accessing my
web
service that I have tried.)
Thanks
Khalique
"Dilip Krishnan" wrote:
Hello Khalique,
In your proxy class in yr test application you need to set the
Credentials.
// Obtain password from a secure store.
String SecurelyStoredPassword = "bla bla";
// Set the client-side credentials using the Credentials property.
ICredentials credentials = new
NetworkCredential("Joe",SecurelyStoredPassword,"my domain");
serviceproxy.Credentials = credentials;
And then make your call.

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Thnaks for your input.
I specify the path like this:
\\mypc\public\testfile.txt
The 'public' folder on 'mypc' is a shared folder and accessible by
Everyone.
The is evident from the fact that another user logged on to the
server
can
check the existance of this file on 'mypc' without having any
special
rights
on 'mypc' or the 'testfile.txt'.
I have not studied the WSE yet but I will start now. Any further
hints
how
attachments work under WSE?
Do the user of the web service need to have WSE on thier machines?
Khalique
"Erymuzuan Mustapa" wrote:
The process running your web services on the server should at least
have
read permission to the file, and it must be UNC path, e.g.
\\clientmachine\C$\myfile.txt, not local path .
BTW I strongly suggest to use Attachment for the web services, WSE
toolkit provides very strong support for attacment.
Regards
Erymuzuan Mustapa
Khalique wrote:
> Hi everyone,
> I Hope that someone will be able to give me a hint to the solution
> to my
> problem.
> I have developed a web service (vb.net) that needs to access the
> folders /
> files and copy files to and from the public folder on the client
> machine.
> It is not a public web service, only accessible on intranet.
> The anonymous access is disabled.
> Windows authentication is enabled.
> Web.Config sets <identity impersonate="true" />
> Using a test app, I call the web method and provide a file name
> with
> full
> path (that resides in a public folder on my machine, the client
> machine) as
> an argument among others. The web method tries to verify the
> existence of the
> file, before doing a copy operation, by calling FileInfo.Exists
> method. The
> method returns false and therefore the operation could not proceed
> normally.
> However, if I logon to the web server and use IE to call the same
> method,
> the web method verifies the existence of the same file on MY
> machine
> (which
> is not the client machine in this case) and thus completes
> intended
> operation
> normally.
> And one of my colleagues can do the same from his machine using
> his
> login
> i.e. he can logon to the server, bring up IE and call the web
> method
> with
> same file name that resides on MY machine and the web method
> completes
> normally.
> What do I need to do, when I use my test application, to enable
> web
> method
> access the public folder / file on a machine on the network?
> Thanks a lot

Nov 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Serge calderara | last post: by
2 posts views Thread by Douglas Harber | last post: by
reply views Thread by Bob | last post: by
2 posts views Thread by baldwin | last post: by
reply views Thread by leo001 | last post: by

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.