[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

upload files with activex (html) object

Posted on 2004-04-07
8
Medium Priority
?
179 Views
Last Modified: 2013-11-13
Hello!

I had no idea how to set the exact title, but I hope it is descriptive enough. So I would like to do file upload with an VB ActiveX component inside my homepage. There is already such functionality wich can be done with html forms, but there the user has to find the file by himself. I would like to avoid this and make this activex find the file for the user.

I have done some job already: I have an activex which takes a file from a web server and saves it at a client, then it is opened by this activex so the user can read it and change it. Now, when the user is done with this file I would like to have this activex to ask the user if he wants to upload the file back to server.

I am trying to use Winsock via TCP, but it seems impossible to get connected to the server. The code is quite simple:

WS.RemoteHost = "127.0.0.1"
WS.RemotePort = 80
WS.Connect
   
If WS.State = sckConnected Then
    MsgBox "Connected"
Else
    MsgBox "Not connected"
End If

It is here winsock cannot get connected. I have tried many different addresses for remote host, but nothing works. Have anyone any clue why this is not working? Is there possibility for some proxy or other things blocking winsock? I'm sick of this behaviour, so any help is appreciated.
0
Comment
Question by:my_moon011000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 1

Expert Comment

by:bfeddish
ID: 10774945

First, I'm assuming you can ping the remote hosts that you are trying to connect to.

Next, does the Connect method ever get called, i.e.

Private Sub WS_Connect()

End Sub
0
 
LVL 1

Author Comment

by:my_moon011000
ID: 10775095
I included this snippet:

Private Sub WS_Connect()
    MsgBox "Connecting"
End Sub

and this message was never shown during execution. Should it be shown or not? I have to mention that I'm executing this activex inside VB design window, I'm not deploying it directly in my homepage. Should I include it as cab package in my homepage first? Anyway, I'll try that too.  
0
 
LVL 17

Expert Comment

by:zzzzzooc
ID: 10775185
Implement some type of Timer to check the state of the winsock instance after you try to connect. For example.. you can have it MsgBox if the state=9 (sckError). Usually helps to troubleshoot.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 76

Expert Comment

by:David Lee
ID: 10780055
This mayb be a foolish question but I have to ask.  Is there a web server running on your local machine?  127.0.0.1 is the localhost so if there's no web swerver running on the machine you're using for the VB work, or if the there is a web server but for some reason it's not running on port 80, then that'd explain why you're not getting a connection.
0
 
LVL 1

Author Comment

by:my_moon011000
ID: 10781576
I tried to pack ActiveX in a cab file, placed it in my serverfolder and it worked! I have connection with the server! So it was wrong to execute the project directly from VB design window.

But now I have another problem, the file is not uploaded at all. I must look more at it, for right now I cannot localize the problem. But what to do with this question now? Delete it or post this other problem too if I cannot solve it? Any suggestions?
0
 
LVL 1

Author Comment

by:my_moon011000
ID: 10867922
I think I should delete this question, but I'm not sure I know how it's done.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10907844
Closed, 500 points refunded.
modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question