Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:17:07+00:00 2026-05-30T11:17:07+00:00

I created a Windows service to upload files from client to a shared folder

  • 0

I created a Windows service to upload files from client to a shared folder on a server having a shared permission with everyone has a full control over it using Microsoft BITS service, this service runs with the local system account. The issue is that BITS jobs always get cancelled and I don’t know why. Please any help will be appreciated.

I’m using this code

Try
            Using BITSManager = New System.Net.BITS.Manager
                For Each sItem In arrlDriversFilesUploadList
                    Using job = New System.Net.BITS.Job("UploadJob", Net.BITS.JobType.Upload)
                        Dim sRemoteFileName As String = String.Format("{0}\{1}", "\\RemoteServer\SharedFolder", "File.txt")
                        Dim sLocalFileName As String = String.Format("{0}\{1}", "C:\LocalLocation", "File.txt")
                        job.Files.Add(sRemoteFileName, sLocalFileName)
                        BITSManager.Jobs.Add(job)
                        job.NoProgressTimeout = 300 '5 Minutes
                        job.Resume()
                        Dim JobComplete As Boolean = False
                        Do Until JobComplete
                            System.Threading.Thread.Sleep(3000)

                            If job.State = System.Net.BITS.JobState.Transferred Then
                evntlg.WriteEntry("Job done")
                                    JobComplete = True
                            End If

                            If job.State = System.Net.BITS.JobState.Acknowledged Then
                evntlg.WriteEntry("Job done")
                                    JobComplete = True
                            End If

                            If job.State = System.Net.BITS.JobState.Error Then
                evntlg.WriteEntry("Job has error")
                                    JobComplete = True
                            End If

                            If job.State = System.Net.BITS.JobState.Cancelled Then
                evntlg.WriteEntry("Job cancelled")
                                    JobComplete = True
                            End If

                        Loop
                    End Using
                Next
            End Using

        Catch ex As Exception
            evntlg.WriteEntry(ex.Message)
        End Try
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:17:08+00:00Added an answer on May 30, 2026 at 11:17 am

    I figure it out, the security permissions on the shared folder were not set on the remote server, I did it then every thing goes smooth.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows service (VB.NET) which downloads files from a server after a
i created a windows service that move files around between the server's hard drive
I have created a Windows Service in VB.net for building xML from a database.
The problem i'm having is that i've created a web service, and a windows
I created windows service using csharp in that i am accessing shared folders which
I created a windows service and installer that watches a collection of files for
I have created a windows service which is currently having three timers. First timer
I have created a windows service which interacts with SQL Server Express Edition. I
I've created a Windows service in C#, installed it on a server and it
I have a program that is stored in program files folder. I created windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.