.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Scan Ports

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
 
I want to scan my local ports and find open ones. how can I do this in VB.Net?? I want to find open ports form my Socket Listener. I have this code - but it is too slow Public Shared Sub Main() Dim intPortStart As Integer = 100 Dim intPortEnd As Integer = 500 Dim lngLoop As Long For lngLoop = intPortStart To intPortEnd Dim myTcpClient As New TcpClient() Try myTcpClient.Connect("127.0.0.1", lngLoop) Console.WriteLine("Port " + lngLoop.ToString() + "started") myTcpClient.Close() Catch ex As SocketException Console.WriteLine("Port " + lngLoop.ToString() + " Closed" + ex.Message) End Try Next End Sub


View Complete Post


More Related Resource Links

Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports

  

Writing a network-aware application isn't difficult, but writing one that is scalable can be challenging. Overlapped I/O using completion ports provides true scalability on Windows NT and Windows 2000. Completion ports and Windows Sockets 2.0 can be used to design applications that will scale to thousands of connections. The article begins with a discussion of the implementation of a scalable server, discusses handling low-resource, high-demand conditions, and addresses the most common problems with scalability.

Anthony Jones and Amol Deshpande

MSDN Magazine October 2000


Comport communication using System.IO.Ports

  
I am using System.IO.Ports to communicate the with the printer(Com RS 232). What i want to know is how can i determine weather the Printer is Power on or not.. (i mean Printer is power cable is plugged in and Power on) and also When to use HandShake.XON/XOFF 

SQL Insert with Index Scan Problem....

  
Hi,   I'm having a very strange problem when inserting rows into a table. Let me try to explain a little better: Table1 (for example Book) with a lot of fields and one foreign key to Table2 (idVolume) and a primary key (identity - idBook). This table has a clustered index only on the primary Key. (this table has something like 10 Millions rows) Table2 (for example Volume) with a lot of fields and a primary key (idVolume) identity. (this table has hundreds of rows)   Now, the problem starts when I make a insertion on Table2. When I made an insertion, it was taking minutes to finish, so I stopped it. After looking into the execution plan of the query, there was something very very strange, there seems to be a clustered index scan on Table1... the problem is that since Table1 has so many rows, this index scan takes forever... Can anyone explain me why does the insertion on Table2 makes an clustered index scan on Table1? It really doesn't make any sense to me.   Thanks in advance. João Teixeira

Table scan going on apart from having an Index

  

Hi,

I have a stored procedure where the performance is bad. The Execution plan shows 5 table scans each of cost 12%. The data is being pulled from the table using the following where clause.

where (datestamp>getdate() - 'sep28 1902 12:00 AM')

I already have an index on Datestamp column but still Table scan is happening. There is no restriction on avoiding index is specified in the query. 

If the index is place inappropriately there would be index scan but here I have table scan.

Could anyone help me in finding out why this is happening.

 

-Thank you,

Jayasree


Table scan going on apart from having an Index

  

Hi,

I have a stored procedure where the performance is bad. The Execution plan shows 5 table scans each of cost 12%. The data is being pulled from the table using the following where clause.

where (datestamp>getdate() - 'sep28 1902 12:00 AM')

I already have an index on Datestamp column but still Table scan is happening. There is no restriction on avoiding index is specified in the query. 

If the index is place inappropriately there would be index scan but here I have table scan.

Could anyone help me in finding out why this is happening.

 

-Thank you,

Jayasree


Pinvoke : GetCommConfig not working for parallel ports like lpt1

  

Hi,

Through PInvoke from VB.net, I am using GetCommConfig and GetDefaultCommConfig to find info on ports present on the computer. However these functions are succeeding only for Serial Ports like COM1 etc and failing for Parallel Ports like LPT1.

Is This by design? The documentation suggests this should succeed for both serial and parallel ports as well as others.

Regards

Mathew Kochekkan


Enumerating used and available network ports on remote server

  

I am working on a setting up a web app, using C# and .Net, to setup/manage an internally deployed product. Part of this requires adding new instances and configuring them which means knowing if a port is available on the remote server.

I've done a bit of searching and can't seem to find a way to do this on a remote system. I could find ways to do it locally which if that is the only way then I may end up doing a localized service to have the web app talk to instead but I wanted to check if there was a way to get this info remotely.

 

Thanks,
J

 


SQL 2008 R2 Dynamic Ports and Static Ports

  

We have a single application (Interaction) that needs the port number specified in the application itself in order to 'talk' to its SQL database. The SQL environment consists of a two node cluster with two named instances. Each of the instances are divided equally between the nodes. We are obviously using dynamic ports on both of our names instances. I gave the application owner the port that the instance the database is currently running on. He hasn't gotten back to me yet, however, I suspect that when he specifies that port in the application it will connect to the database just fine. If it does, I need to come up with a plan for this one application.

Is there a way to use both dynamic ports with a static port specified? In the TCP/IP properties under the instance name, dynamic ports are used because the 'TCP Dynamic Ports' is set to '0'. Can I set it to something like '0,5100'? That way it'll still use dynamic ports with a specific port to always listen on? It seems like a stretch, but I'd rather not change my whole environment due to one silly application.

Another solution is to maybe create another instance for this one application and set the port statically? That's also very silly in my opinion to have a dedicated instance with only one database to set a static port. If anyone has any other creative ideas, besides just using the

JDBC Connection using Dynamic Ports

  

I have a sql cluster running 3 instances.One of the user is trying to connect to these instances using JDBC connectivity.We have configured to use Dynamic ports so the url with the default port is not working for us and I cannot change the port.Can you please plese let me know the URL for this.Also on the Surface Area Configuration Manager I sec Client Protocols ,How is this different from the Protocols for each instance.

 

Thanks,

Koduru.


Scan PDF file and return words

  

I've a problem while using ASP.

My situation is I want to convert every documents' contained words into database and upload those document to server.

For example: MS word, MS Power Point, MS Front Page and PDF files.

Those words needed to store into database and let others to search by content.



Thank You !


Single WCF Service with multiple ports

  

Hi All,

            I have  created a WCF service that receive and  give the update to subscribing clients. Now, we host that service on single server only ( this service is hosted as a window service) , So i want when WCF receive any update from a specific client   and  it will give the update  to  only that  specific  client .  I don't want to create separate service for every client . Can i achieve this in single WCF Config file by mention different Ports for each client?  I am using net tcp approach that is best suited for my environment.  I have used BaseAddressPrefix and also mention the URI directly in the endpoints but it  give update to all clients subscribe on different ports. Any solution?  I only wants  this in that way if possible "specific port for that specific client".

Thanks in advance

Query defaults to a Clustered Index Scan instead of using an Index Seek

  

I have query that behaves much differently the moment I modify the Where clause

 

The following query runs fast!!

-----------------------

SELECT

 

e51.ENTITY_ID, e51.PERF_FREQ_CODE, e51.END_EFFECTIVE_DATE,

Where to find SharePoint Virus Scan APIs?

  

Hi,

We need to use SharePoint Virus Scan API and implement IMso_VirusScanner interface. However, not sure of how to go about. Where, in which namespace can we get this interface? Or we need to download it specially?

Thanks


System.Data.SqlClient.SqlError: Could not continue scan with NOLOCK due to data movement. (Microsoft

  

Hi,

I am trying to restore SS2000 database backup .BAK (full backup) on to SQL Server 2005 and at then end SSMS throws an error

System.Data.SqlClient.SqlError: Could not continue scan with NOLOCK due to data movement. (Microsoft.SqlServer.Smo).

Any help will be appreciate on this.


Scan documents from web form

  

How i can do that? I wanna that detect a scanner and you can push a Scan Button.


Thanks.


The query is using a index scan not seek.... how can I get it to use a seek.

  

The query is using a index scan not seek.... how can I get it to use a seek.

I am using SQL 2005


Mr Shaw

any body had faced these problems with IBM APP SCAN Tool?

  

Hi All,

i run the IBM APP SCAN vulrunrability tool on my site it is giving me following attacks

1)Cross site request forgery attack (how can we fix it   and  how that tool is doing this attack on a particurlar site, i didnot understand if anybody knows you can explain me) 

2) sql injection ( for this we done parameterised queries, but that tool still showing that blind sql injection is there ? how is it possible after using parameter queries? )

3)Http header injection ( what is workaround for this)

but i didnt understand one thing how that tool is performing the above attacks , if anybody had experience the above problems let me know. ( if anybody worked on the APP SCAN TOOL let me know)

Thanks,

Burepalli V S Rao.

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend