Issue on task Write File to WebClient Services - VisualCron - Forum

Community forum

JZatulove
2009-01-27T23:03:01Z
I'm attempting to use the Write File task to write to a UNC for a web folder on a Microsoft SharePoint server and am receiving a result of "Unhandled exception in task: the network path was not found." I'm able to successfully write to a regular UNC file share on the target server, but not a web folder. Can you confirm if this is a limitation of Visual Cron?

Thank you,
Josh
Support
2009-01-28T09:10:21Z
From what I understand a web share just controls the rights for IIS when the web page is served. If you want to share this folder through normal network access you have to set user access in Security tab of the folder.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
JZatulove
2009-01-28T16:07:09Z
I don't think it's a permission issue. I just tested by using the execute task to call 'cmd.exe /C copy {localPath} {UNCPath} using the same credentials I was using for the write task and doing this works.
Support
2009-01-28T16:48:23Z
Can you try to add write properties in the security Tab? Just to confirm this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
JZatulove
2009-01-28T19:05:35Z
sharepoint web folders aren't permissioned through IIS or Windows security, they're configured through sharepoint. The folder itself doesn't even exist in a windows directory, it's served up by sharepoint. There's a WebClient service on a windows box which interprets this path, so when browsing the UNC path explorer.exe actually interprets it as \device\WebDavRedirector\{server}\{path}\
The cmd.exe task i setup is currently running w/o issue and with the same credentials as the write file task which was failing.
Support
2009-01-28T19:13:45Z
But if you have a WebClient running in Desktop mode it is probably not accesible from a Windows Service - only for your current desktop session. Then you need to create a real UNC share.

Remember that a service runs in the background - so even if windows services had access to the webclient they wouldn't have access if no one is logged in.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
JZatulove
Support
2009-01-28T21:05:06Z
Ok, but still, it does not work as expected. I don't know the limitations with this application but I think we have found one here. I don't see why you can't open normal security access to that folder?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-01-28T21:11:13Z
More information from us. The SYSTEM account, which VisualCron run as, don't have any network access unless given. There are two ways to give the SYSTEM account network access:

* use UNC paths with logon. In this case, this web client does not seem to support this.
* map a network drive

The other alternative is that you change the user that runs the VisualCron service to the same user as you are logged in as.

A third alternative is to share the folder normally through the Security tab.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
JZatulove
2009-01-28T22:04:03Z
The folder doesn't actually exist as a folder on the file system, which is why I can't go to folder properties and change any security settings. The folder primarily exists as a web folder, served up dynamically by Microsoft SharePoint via IIS and accessable by http://server/path/ or the windows WebClient service via a UNC path.
I just tried using the map drive method, and while I can map a drive to the folder, it could still not be written to.

However, following your suggestion to change the VC service account to my user login I got a new error. When trying to write to the mapped drive and the UNC I got the error: "Impersonation failed in task". This only happened when the service and the task credentials were running as my account.



Support
2009-01-28T22:05:41Z
Yes, when changing the user that runs the Service you have to disable all Credentials using that user. So, in this case you should not use any Credential as you already "are" the user.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
kennethD
2010-01-07T23:28:09Z
I would like to reopen this thread. I need VisualCron to create folders and move files into SharePoint. I have followed all the steps you described previously, such as running the VC service under my account, mapping a drive, etc. Still doesn't work. When using the create folder task, I simply receive the access denied error. When using the Execute task, where I call a VBScript, it executes the script, but it does not complete. However, when I am logged into the server on which the VisualCron service is running, I can execute the script manually and it works every time. When the script is executed by VisualCron, it runs under my account - same as when I run it manually.

I would prefer to be able to do these things directly from VisualCron and avoid calling a script - any ideas here?
Support
2010-01-08T00:33:05Z
Hmm..I think that WebDAV is the only protocol that works for this. We will examine this and maybe post a simple sample exe to see if that works for you.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-08T00:47:41Z
Please try the attached file and send us back any error message you get (or hopefully a successful result :))
File Attachment(s):
WebDAVTestV1.zip (23kb) downloaded 58 time(s).

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
kennethD
2010-01-14T22:59:58Z
Received the following error:

Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.

Tried it both with and without Use Credential checked
Support
2010-01-14T23:06:31Z
Did you try with a http url? Perhaps you did use a ftp url?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
kennethD
2010-01-14T23:31:00Z
My scripts upload successfully using a UNC path. When I convert it to an http URL, it does not throw an error, but it also does not upload the file.
Support
2010-01-15T00:20:01Z
1. could you give us a sample url that you use?
2. are you able to access server logs to see what happened?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-18T23:41:57Z
Please try this new attached sample instead to see if it works better for you.
File Attachment(s):
WebDavUploadDemo.zip (12kb) downloaded 65 time(s).

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
kennethD
2010-01-22T01:04:29Z
I'm receiving the error now: 401 - not authorized.
Support
2010-01-22T09:45:57Z
Are you using a proxy?

We tested this application against sharepoint and was able to upload a file using the right Credentials.

There might be a couple of reasons for this:

1. the destination folder that you specify might be wrong
2. you are using a proxy and credentials are not passed alright
3. the credentials are wrong
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
kennethD
2010-02-22T20:08:15Z
Not using a proxy, and the credentials are correct. Which version of SharePoint did you use to test? We're using SharePoint Server 2007. Also, if you tested in the 2007 version, did you successfully upload a file into a subfolder of the Documents section?
Support
2010-02-26T17:37:20Z
We tested this on Team Foundation Server 2008 which is probably based on/using Sharepoint 2007. And yes, we uploaded to documents section. We will try to install Sharepoint 2007 when we have time but perhaps you could test using a local user instead of domain user?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-04-26T11:33:27Z
Hi,

I tried the WebDavUploadDemo application to upload a file to Sharepoint 2007.
I get however an error:

An error occurred while attempting to Upload the file. The specific error message is:
The remote server returned an error: (401) Unauthorized.


I use the same credentials as my logged in user.
I can access the URL I entered in the app, and I'm able to create and delete files is there.

So it's not working for me.

Regards
Erik
Uses Visualcron since 2006.
Support
2010-04-27T10:23:50Z
We previously tested this on Team Foundation server (which I think uses a part of SharePoint 2007). This worked.

We installed SharePoint 2007 on a Windows 2008 x64 server yesterday and that worked as well. I think you are entering the destination path wrong so I am attaching a screenshot of my settings including the default path for documents in SharePoint 2007.

Please test with this path (exchanging the server name).

I assume that the default server path is the same but it is easy to verify. Just copy the address of an already existing file and remove the file name and you get a valid path.

Also, try this locally on the SharePoint server first - so you rule out any firewall and other connection problems.
Support attached the following image(s):

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top