Socket Programing By C#?

Nov 15, 2010

Is this Possible that write a Socket by C# in ASP.net ?

for Example Can i write a Code Like this Perl Code in C# and asp.net ? :

> use HTTP::Request::Common qw(POST);
> use LWP::UserAgent; $ua = new
> LWP::UserAgent(agent => 'Mozilla/5.0(Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5)Gecko/20060719 Firefox/1.5.0.5');
> $ua -> timeout(20);
> my $req = POST 'http://Example.com/',
> [ login_username => 'mehdi' , login22 => '654321' , go => 'submit'];
> my $content = $ua->request($req);

View 1 Replies


Similar Messages:

Memory Management while Programing Web Applications?

Nov 19, 2010

I want to know how we will manage memory while programing web applications and how to know if there is a memory leak.I have an application which gets data from a view available in sql server and refreshes the grid every 2 secs using Ajax UpdatePanel. This page runs all the time in the client machine.How can I check whether the memory is used properly when its run all the time and doesn't cause any memory leak problem or any system crash.

View 3 Replies

Visual Web Developer 2010 Express Programing Process?

Dec 19, 2010

learn to use visual web developer but encountered a problem. I wat to be able to upgrade something and then as the lv goes up the time to do something goes down.

View 2 Replies

Cannot Make Socket Connection

Jul 28, 2010

Iam trying to make a socket connection and am facing with the following error.

Socket tempSocket =new
Socket(ipe.AddressFamily,
SocketType.Stream,
ProtocolType.Tcp);

The tempSocket is connected to the particular IP and tempSocket.Connected is giving me value as True. But the property MultiCastLoopBack property is giving me the following error with error code 10042.

"An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call."

So is there any problem with the IP or Tcp is not supported with Stream as SocketType?

View 3 Replies

Architecture :: Socket Communication Between C And C#?

Mar 22, 2011

I've a project in C which acts as a server and accepts socket communication. The server project has multiple C files is an exe which accepts messages from the client program and responds accordingly. I've to write a Client program in C# which should open a socket communication and send a series of messages depending on the result of previous message sent.

Is it possible to send a message in such a way that it will call a function in one of the C file in the server project?

View 1 Replies

Web Forms :: Using Socket Connection / Error?

Oct 22, 2010

Am using socket connection to send and receive values. The following code is used to receive response.

[Code]....

In the above code, am facing a prob in skt.Available. If i dont give the thread.sleep, it is not repeating the while loop and it exits after onetime. And if i dont give skt.Available line, sometimes it throws socket Exception. I do not want to use thread.sleep. Does anyone knows why this is happening and how can i resolve this?

View 4 Replies

Architecture :: MSMQ And Socket Programming In Web?

Dec 31, 2010

I am working on live trading system, in this web system i have to show live data so i am calling my store procedure for bind my data. I have few questions -

Is it possible to use MSMQ in web ?
Is it possible to use socket programming in web ?

Its because i am calling SP in every 5 seconds and its very lengthy. I want to use socket programming or MSMQ in LIVE trading system because if any thing update or modify in tables then only web page get notification from MSMQ or Socket and i will bind my page then only. And if possible then its secure and perfect for web live environment ?

View 8 Replies

How To Do Client Asynchronous Socket In Application

Aug 6, 2011

I am in the progress build a client ASP.NET application (C#) that can display messages from a server application as soon as it receives them.

At the moment I am using an Asynchronous Client Socket but the OnRead event does not fired as soon as the server sent the strings

How to do client asynchronous socket in ASP,NET?

View 1 Replies

State Management :: Keep Socket Connection Open?

May 26, 2010

I wrote a small socket client application talking to my asp.net server application.

On the asp.net side, I created a IHttpHandler. I want to send data back and forth on one HTTP request.

I tried the following code which run an infinite loop inside function ProcessRequest(). The client side opens a socket connection and send HTTP POST request.

I am not sure how asp.net work. In HTTP POST I have to specify Content-Length, I tried a small value, like 20, then asp.net handler can only get 20 bytes in the inputstream. I tried to use 4096000 bytes(close to the maximum IIS allowed), then the inputstream cannot get anything, it seems IIS is waiting for all data(4096000) to come from client side before it gives the handler a chance to read from the socket.

public class DeviceDataHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
try
{
Stream inputstream = context.Request.InputStream;
Stream outputstream = context.Response.OutputStream;
/loop forever until exception is thrown
while (true)
{
ProcessData(inputstream, outputstream);
}
}
catch (Exception ex)
{
ZenLog.logError("DeviceConnector exception: " + ex.Message);
}
}
public bool IsReusable
{
get
{
return true;
}
}
}

View 1 Replies

Create Packet Header Using Socket Programming C#?

Jun 11, 2010

I want to create custom packet header and append it to data.and send the data to remote machine using socket programming C#.

View 1 Replies

A Socket Operation Was Attempted To An Unreachable Host / How To Fix This Error

Jun 5, 2010

I'm calling Another url from my web aspx page. I'm writing

[code]....

But I'm getting error

A socket operation was attempted to an unreachable host 208.101.14.59:80

I tried the same url by pasting it on address bar and works fine. When I call my vendor they r saying that there is no any problem from their side. Someone has suggested me that there may be some settings in web.config.

View 9 Replies

C# - How To Send Data From Socket Server To Aspx Page

Dec 3, 2010

I want to send socket information to aspx page.eg. I have 80 clients connected to server. Server is doing some calculation based on the user input and if one of the condition is true, it will send the signal to all the connected clients. I'm the client. The other vendor is the server. Currently, my application is windows based, I want to change it to web based. So, When the server send the signal , I want to receive this signal from the web page.

View 1 Replies

C# - Hosting A Socket Service In Asp.net - Issues With Application_start & Application_end?

Dec 20, 2010

We have a component that needs to sit in asp.net that creates a listening socket on a well known port.The reason we have the socket is the asp.net need component needs to received events from external services and other technologies weren't quick or flexible enough.We start the socket listening in application_start,and close the socket in application_end. The issue is if we are receiving http requests to the web site, and modify the web.config, the application_start event is called before the application_end is called,so we cannot open the socket (we get an error about duplicate socket being open). We dont have a reference to the original socket in the application_start after the web.config change, so we cannot shut it down from there.

View 3 Replies

IIS Configuration :: A Socket Operation Was Attempted To Unreachable Host IP 587

Jan 31, 2014

I write code for sending mail. Its working fine in local  at Execution time. After i Hosted into server. it shows the Error.

A socket operation was attempted to an unreachable host [IP]:587

code:

Dim mail As New MailMessage
mail.To.Add("xxx@abc.com")
mail.From = New MailAddress("yyy@gmail.com")
mail.Subject = "Subject"
mail.IsBodyHtml = True
mail.Priority = MailPriority.High

[Code] ....

View 1 Replies

How To Pass Binary Value To Active Socket Object 3.5 - Dll Function WriteAsUnicode

Aug 5, 2010

I am using one DLL file of Active Socket Object 3.5 and it has one function writeAsUnicode which take String as parameter. But I need to pass binary value. In ASP, it can be done but in asp.net it becomes problem. So is there any other way to solve it.

View 1 Replies

Secure Socket Layer (SSL) - How It Provide The Functionality Of Encryption And Decryption Of Data

Mar 3, 2011

explain me Secure Socket Layers (SSL) and how it provide the functionality of encryption and decryption of data ?

View 1 Replies

Security :: Socket.send Takse More Time On Windows Server 2008?

Jun 24, 2010

[Code]....

View 3 Replies

Web Forms :: How To Make Default.aspx Or Homepage A Secure Socket Layer Page

Sep 1, 2010

1)How to make Default.aspx page a Secure socket layer page?

2)How much code does this take?

3 Is it easy ? i have no idea how this works

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved