Ping remote host in ASP.NET...

Hey everyone,

I need the ability to ping a remote host from my web page.
Has anyone gotten this to work?
I've created the project but get the error: An attempt was made to access a socket in a way forbidden by its access permissions

I went to microsoft's web page and came across with this: http://support.microsoft.com/default.aspx?scid=kb;en-us;195445

Does anyone have an example of how to run a ping from JodoHost? (ASP/PHP/ASP.NET)

Any help at all will be much appreciated!
Thanks,
Jason
 
YEEEEHHHHHHAAAAA!!!!!!

Read This:

Change 1

The first error encountered is typically a


An attempt was made to access a socket in a way forbidden by its access permissions
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions message that says:



To fix this, you will need to

Open Control Panel | Administrative Tools | Local Security Policy, select Local Policies and then User Rights Assignment from the tree "Act as part of OS" should be the second entry on the right hand paneontrol Panel. Add the ASPNET account to this list.



Change 2

The next change is a web.config entry that allows you to actually impersonate an administrator. To do this, open up the web.config in a text editor. Locate the <system.web> tag and add the following <identity> tag immedately afterwards.

<identity impersonate="true" userName="computername\AnAdministratorAccountHere" password="ThePasswordHere"/>


You can find all the page at this address:
http://www.aspnetping.com/tutorials/aspNetPingInASPNET.aspx

I've tried, and now my script.... WORKS!!!!!

Bye,
Francesco
 
Back
Top