Forum Discussion

aashish9601's avatar
aashish9601
New member | Level 2
7 years ago

BUG - The remote server returned an error: (460) Restricted.

Hi..

I am using DropBox to Update My Application. I have created a share link of file "CurrentVersion.txt".

 

My Code reads the text from the file and check against the current version. And if there is an new version , the Latest.exe is downloaded.

 

What i have noticed is, if the "CurrentVersion.txt" Contains only "1.0.0.0" then i am getting the error, and if there is anything else in the file say even "1.0.0.1", then no error is displayed.

 

I have noticed the same behaviour when creating a link to this particular file. If it contains "1.0.0.0" then i get an message as "You don’t have permission to create a link to this file".  And if the file contains something apart from "1.0.0.0" the link is created.

 

My Code

Try

            Dim request As HttpWebRequest = CType(WebRequest.Create("https://www.dropbox.com/s/ym194ty8lrifzhw/NewVersion.txt?dl=1"), HttpWebRequest)
            Dim Response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)

            Dim Sr As IO.StreamReader = New IO.StreamReader(Response.GetResponseStream)

            Dim NewVersion As String = Sr.ReadToEnd
            Dim CurrentVersion As String = Application.ProductVersion

            If NewVersion <> CurrentVersion Then
                MessageBox.Show("New Version Exists", MsgboxHeader, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Else
                MessageBox.Show("No Updates Found", MsgboxHeader, MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If

        Catch ex As Exception
            MessageBox.Show("An Error Occurred while trying to Check for Update" & vbCrLf & vbCrLf & "Error Details:" & vbCrLf & ex.Message, MsgboxHeader, MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

 

 

 

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Apologies for the trouble. This should be fixed now.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 21 hours ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!