473,395 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

:: WINSOCK CLASSIC ASP UNIX :: Send Comman and get Response

Dear Sir

Can someone post how to send a command to Unix Terminal using Winsock and Classic ASP..

Much obliged

Regards
JAY
Apr 5 '13 #1
5 1581
r035198x
13,262 8TB
We don't give out codes here. We merely try to help if you are stuck with your code. If you want to get free code just use google. You'll find lots of results like this one http://www.ostrosoft.com/oswinsck/oswinsck_asp.asp
Apr 5 '13 #2
Sir,

Thanks for the Quick Reply..

I am using the below Code

Expand|Select|Wrap|Line Numbers
  1. <%
  2. dim cmdtosend,sockval,strInData,strTemp,counter ,IP_ADD,PORT_NO,WAIT_TIME
  3. Response.Expires = -1000
  4. cmdtosend = "touch x.txt"
  5.  
  6. IP_ADD = "172.25.23.12"
  7.  
  8. PORT_NO = 22
  9.  
  10. WAIT_TIME = 5
  11.  
  12.  
  13. if cmdtosend <> "" then
  14. set sockval = Server.CreateObject("MSWinsock1.Winsock")
  15. if not sockval.ConnectSock (IP_ADD,Clng(PORT_NO)) then
  16. Response.Write "Failed to connect"
  17. else
  18. Response.Write "Value is : " & cmdtosend & "<BR>"
  19. sockval.ConSendData cmdtosend & vbCr
  20. do while InStr(1,strInData,WAIT_TIME,vbTextCompare) = 0 and counter < 500000
  21. counter = counter + 1
  22. sockval.ConGetData strTemp
  23. strInData = strInData & strTemp
  24. sockval.ConDoEvents
  25. loop
  26. sockval.CloseSock
  27. end if
  28. set sockval = nothing
  29. end if
  30. if IsObject(sockval) then
  31. set sockval = nothing
  32. end if
  33. %>
I am getting the below error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/ANJ/UNIX/1.asp, line 16

800401f3
Apr 5 '13 #3
Any Help Is Really Appreciated
Apr 5 '13 #4
r035198x
13,262 8TB
Did you install the Winsock Component properly and register it on your server?
Apr 5 '13 #5
Yes Sir I Have registered WinSock
Apr 5 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Steven Blair | last post by:
Hi, I am using C# and IIS for a application. I receive a request message, process it then send a response back to my client. The problem I have, when I call Response.Write the message sent to my...
1
by: Nadav | last post by:
Hi, Take in mind the following scenario: two computers are sending data to each other ( using winsock ), one computer send data faster then the rate data is being processed by the other computer,...
0
by: bruce | last post by:
I'm testing a very simple web services called Add (take 2 integers and return the result). The service program is done in VS.NET and work well using HTTP POST. I wrote a simple (Classic) ASP SOAP...
1
by: Andy Fisher | last post by:
Hi all, I have a problem with a smart client in that when it makes a call to a web service, the server needs some kind of confirmation that the response has been received by the client...
4
plumpnation
by: plumpnation | last post by:
Hello one and all. I have recently been working outside of my field of expertise alot, and it is greatly distressing me. I have learned a small amount of php and actionscript, but now need to move...
1
Frinavale
by: Frinavale | last post by:
Hi there, I'm currently using VB .Net to develop a web application that sends emails periodically. Everything works fine in the test environment but not on the real server. After reviewing the...
0
by: johnemisylpaler | last post by:
can you teach me how to use winsock how to send a data to other computer using winsock in vb6.0... help me master... im john. i am a student of one of the Computer school in Phillipines help me...
3
by: =?Utf-8?B?enBlcmV0eg==?= | last post by:
Hallo, I Can't get reed of http response headers . Thow I used : Response.ClearHeaders witch MSDN say's it should clear up all http headers I'm on VS 2005 - windows xp IIS Thank you
1
by: JamesA | last post by:
I’ve written a program in C# which scans a network of devices connected to the serial port. I use a thread to send a message addressed to a external device then I use ManualResetEvent.WaitOne(200)...
3
by: kaushik ankur | last post by:
Dear sir. The project is related to the iphone application. and i am working at server side. The language used is PHP. About the application: It is a game that will be played at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.