How to use Shell Command in ASP.NET

  • Thread starter Thread starter nyousfi
  • Start date Start date
N

nyousfi

Hi

I have a Client Control that works absolutely beautifully but I need
to popup a browser window using this control but cant.

I thought the easiest way to do this would be to Run a Shell command
and pass in the URL i.e. Shell("http://www.abcdef.com").

When I put the shell command in an exception comes up

Exception: System.Security.SecurityException: Request for the
permission of type System.Security.Permissions.SecurityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed

Can someone please help! I think I have to change the .NET
Configuration but don't know how.

Thanks in Advance
:D
 
The .Net configuration is fine. The problem is that the server is not the
client. You're trying to execute a Shell command on the server. This has no
effect whatsoever on the client. To open a browser on the client, you would
use the JavaScript window.open() method.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Thanks for your reply.

It's a client control written in VB.NET. It doesn't run on the
server, it runs on the client and that is why I'm getting the errors.
The system runs on the our Intranet and therefore I have got control
of servers and clients.

I'm just wondering what permissions I need to give the .NET framework
in order to run the shell() command, any help will be appreciated.

Thanks
 
Back
Top