I am trying to fill a web form (hosted in a remote web site) from a VB NET 2.0 Application.The web form has a submit button, as usually, in order to start some process and then send the result to some emails accounts).[code]
I am trying to upload a file to Mainframe machine from my VB.net application. I am getting the following error.The remote server returned an error: (501) Syntax error in parameters or arguments
Using vb.net 2005 - FtpWebRequest for ListDirectory always gets 550 error The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
On both FTPListDirRequest.Method = System.Net.WebRequestMethods.Ftp.ListDirectory
When I tried to read the data of a http link using VB.net, an error occur. The error is:The remote server returned an error: (406) Not Acceptable.This error is only occur for some links.
I am writing a small ftp application for a friend and I'm not sure whats going on here. I'll try to be as descriptive as possible. I get a 553 error "The remote server returned an error: (553) File name not allowed." when I try to upload a file.
[Code]...
I added a msgbox to show me what the path to the server is and this is it.Click OK and it gives me the error above.So I changed the "ofd.Files.FileName to ofd.Files.SafeFileName My msgbox now shows this:Then VS throws en error saying it can't find the file in the projects debug folder so I move it there and run the program and it uploads. I noticed that in the first msgbox it has forward and backward slashes could that be my problem or is it something else?
I have a problem when trying to send a POST request. The sending method looks like this:
Public Sub SendXML(ByVal file As String) Dim reader As New StreamReader(file) Dim data As String = reader.ReadToEnd()
[Code]....
Now looking at this I suspected that it was due to the fact that the server does not accept POST messages. But some other reading suggests that the the URI [URL] has been generated with a proxy and should be /Request so the line should read POST /Request HTTP/1.1
So what would be the common reason for this? And if it is a proxy problem, how is it sorted?
As asked below, I have created a new question for the more specific request. Changing absolute URI to relative in HTTP POST header
I attempting to download 6 files from my FTP site to a local server using VB 2008.After 1 or 2 files are downloaded I am geeting an error Bad sequence of commands.It appears the ftp connection is not closing then re-opening.[code]Then I change the file name. After the 2nd or 3rd file, I get the error message.How would I close the connection and reopen it without having to close the program?
I've made this script to read the lines from the txt. But when I try to login I just get this " The remote server returned an error: (530) Not logged in." Even I "logged in" at the link.
vb Private Sub Refresh_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh.Tick
TextBox1.Text = GetWebSiteSource("ftp://<myusername>.<mypass>/<serverip>/<serverIP>%20port%2027016/Server%20Documents/log.txt") Dim lines As New List(Of String)(IO.File.ReadAllLines(TextBox1.Text)) Tname1.Text = lines(0)
I am developing a tool to get all elements of a web page (images, links etc...) and I am having a small problem with the Download button. I click it, and becuase we use a proxy at school no matter what I try it will always throw the error: "The remote server returned an error - (407) Proxy Authentification Required"How do I detect that the user is using a proxyAnd then if so, authenticate with it so that I can download the file?
Does My.Computer.Network.DownloadFile work with FTP? When I attempt to use it, I get the exception: "The remote server returned an error: (500) Syntax error, command unrecognized."
Here's the code I'm using: Dim UpdateAddress As String = "ftp://xxx.xxx.xxx.xxx" & lbDownload.Items(X).ToString My.Computer.Network.DownloadFile(UpdateAddress, BasicPath & lbDownload.Items(X).ToString, "", "", True, 10000, False, FileIO.UICancelOption.ThrowException) The FTP server is IIS6.
I am using Visual Basic (VS 2005) windows 2003 and Exchange 2003. Also I have developed WEBDAV functionality for retrieving messages from my exchange. Everything worked fine until they have asked me to move to 2007. I already know that Microsoft has de empasized Webdav but they say that they still supporting it.My problem is that every time I'm trying to retrieve contacts or inbox or whatever I getting The remote server returned an error: (403) Forbidden Below is a sample of my code
Dim sQuery As String Dim SNList As System.Xml.XmlNodeList Dim Email1List As System.Xml.XmlNodeList
[code]....
I cannot find any examples written in Visual Basic for Exchange 2007. I want to start using the webservices but I cannot find any examples. Where can I find them ? Everything is written in C++ or C#.
I am using an external DLL (pdfsharp) to open (then manipulate) lots of PDF files. I use: Dim inputDocument = Pdf.IO.PdfReader.Open(PDFPath, IO.PdfDocumentOpenMode.ReadOnly) Problem is - it seems to hang on certain, rare files. I don't seem to get any timeout - it just hangs for hours on this line. We read thousands of files with this code, always on tiny files, so I was thinking that a quick workaround might be to somehow timeout if the this method takes more than a second or two. But I don't see a simple way to do this. I am hoping to avoid spinning up a worker thread.
I'm refactoring VB.NET code where methods routinely run five hundred lines and the references are so tightly coupled that the code defies simple refactoring such as method extraction. And that's why I thought I would try regions within a method body. I just wanted to organize the code for the short term. But the IDE didn't let me (resulted in a compiler error.) I'm just curious as to why? Seems like code regions shouldn't impact the compiler, intellisense etc. Am I missing something? (Still using VS 2005 btw.)
Interesting: This seems to be language specific. It's OK in C# (I didn't check that initially) but not in VB.NET.
public module MyModule Sub RunSnippet() dim a as A = new A (Int32.MaxValue )
[code]....
that gets a compiler error but the C# version is ok.
I am trying to post data to a form on my website. This works perfect.To expand off for personal use and education, I decided to try and add proxy support. I got a list of some proxies, and did it up. The proxies work, and all is good. But, when I try this with this specific example, I receive 1 of 2 errors depending on the proxy used.(405) Method Not Allowed or (500) Internal Server Error.I realize that both of these are being caused from the proxy side of things, but maybe theres an issue with my code?
Trying to POST a username & password to my PHP script at www.example.com/web-service.php which gets that info and echos true or false.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Connect to web-service Dim hwrRequest As HttpWebRequest = HttpWebRequest.Create("http://www.example.com/web-service.php")
[code]....
Am I missing anything? It stops and throws that error on the line that calls GetResponse()?
When ever I try to create a new project, any project using VS2008 B2 running on Vista I get this error. "Requested Registry Access is not allowed." Obvious registry thing bu t would rather not get into and mess with any hives
I want to build an application, which can remote access to SQL Server in Server Machine.I used to build one, and it also can access to SQL Server in other pc. But when i promote it to become a Server(to become a Domain Controller). My application has never access to SQL Server. I don't know what to do now?
remember: I want to build an application, which is accessing to SQL Server in Window Server(Client/Server Application).
Why does my the declaration of my string in the code result in the following error? Is there a workaround?
Code:
<script runat="server"> Protected Sub form1_Load(sender As Object, e As System.EventArgs) Dim x As String = "</script>"
[code]....
Error: Statement cannot appear within a method body. End of method assumed.
Note: The following page did not fix my issue and instead resulted in the string </script> being output in my page. ( VB.NET hates </script> tag in string literal )
I've found a few examples of using vb.net to access an sql database, so far none of them have worked . They all involve using DataReaders. Maybe its the fact that the sql db is not on the same machine as the application.I was just wondering if anyone had a more comprehensive example of using VB.NET to access a remote sql server.
EDIT:I've received a few helpful comments an replies already. So far my connection string looks like: "server=sqlblah.myhost.com;uid=myuser;pwd=pass;database=testdb"
Probably also good to mention their is no editing of the tables a this point, just reading.
How can I connect to a database using sql server 2000 and stored in another PC with vb net (still in 1 LAN)?So that PC only stores the database, and another PC store the user interface and business logic.Is it related to the connection strings, on the datasource, we just put the IP address for that remote sql server?
I want to understand the concept of connecting to a remote PC or server. I'm working on an app that will connect to a remote server. Read a value from a registry key and then display the results in a text box. It will also connect and search for a specific log file on a server. I understand how to read the files. I'm just not sure how to connect to a machine remotely if I have valid credentials. There seems to be sever ways to accomplish this. I want the most efficient way using vb2008.
I'm been learning about connection strina I have been able to succesfully connect to a sql database stored locally on my Pc.The next logical step would be to connect to a database stored on a remote server. My question is does anyone of a sql database ( or any other type of database ) which can be openly accessed by the general public. Does anyone know if a web hosting service would allow me to remotely connect to a sql database ? Could I for instance upload my database onto a web hosting service and try connect to a remote database that way