System.Security.SecurityException Error

Discussion in 'ASP .Net Web Services' started by Michael [Multnomah], May 5, 2005.

  1. Hello All,

    I have built and deployed a .NET web service to a web server
    [DBADMIN-DEV1]. Then, I created a C# console application wrapper
    around this web service to pass the parameters from the command line.
    When I run this console EXE LOCALLY calling the web service on the
    remote machine, it works fine. When I copy the EXE to the remove web
    server where the web service is running and run it LOCALLY on the web
    server, it runs fine. But now I have created a share with a UNC path,
    so I can call the EXE directly on the remote machine from anywhere,
    without having to maintain a local copy of the EXE. So, I try to make
    this call:

    \\dbadmin-dev1\multco_console_remedy\multco_console_remedy.exe param1
    param2 param3 ...

    BUT I get the following security error:

    ERROR: System.Security.SecurityException: Request for the permission of
    type System.Net.WebPermission, System, Version=1.0.5000.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
    at
    System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
    grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
    PermissionToken permToken)


    What permissions or changes do I need to make on the web service or
    console app to allow remote execution?
     
    Michael [Multnomah], May 5, 2005
    #1
    1. Advertising

  2. Using .NET configuration tool you may set network zone as trusted. But it is
    not an acceptable solution, i know. I would like to ask u what about calling
    web service dynamic discovery or static discovery is used....

    --

    Thanks,
    Yunus Emre ALPÖZEN
    BSc, MCAD.NET

    "Michael [Multnomah]" <> wrote in message
    news:...
    > Hello All,
    >
    > I have built and deployed a .NET web service to a web server
    > [DBADMIN-DEV1]. Then, I created a C# console application wrapper
    > around this web service to pass the parameters from the command line.
    > When I run this console EXE LOCALLY calling the web service on the
    > remote machine, it works fine. When I copy the EXE to the remove web
    > server where the web service is running and run it LOCALLY on the web
    > server, it runs fine. But now I have created a share with a UNC path,
    > so I can call the EXE directly on the remote machine from anywhere,
    > without having to maintain a local copy of the EXE. So, I try to make
    > this call:
    >
    > \\dbadmin-dev1\multco_console_remedy\multco_console_remedy.exe param1
    > param2 param3 ...
    >
    > BUT I get the following security error:
    >
    > ERROR: System.Security.SecurityException: Request for the permission of
    > type System.Net.WebPermission, System, Version=1.0.5000.0,
    > Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
    > at
    > System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
    > grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
    > PermissionToken permToken)
    >
    >
    > What permissions or changes do I need to make on the web service or
    > console app to allow remote execution?
    >
     
    Yunus Emre ALPÖZEN [MCAD.NET], May 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ali
    Replies:
    0
    Views:
    649
  2. Luis Esteban Valencia
    Replies:
    0
    Views:
    4,180
    Luis Esteban Valencia
    Jul 14, 2005
  3. stephen
    Replies:
    4
    Views:
    4,327
    Nicole Calinoiu
    Aug 9, 2006
  4. Siberwulf
    Replies:
    0
    Views:
    1,676
    Siberwulf
    Oct 6, 2006
  5. Leyla
    Replies:
    2
    Views:
    745
    Leyla
    Aug 17, 2006
Loading...

Share This Page