Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. security problems

security problems

Scheduled Pinned Locked Moved Visual Basic
csharphelpc++security
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pnpfriend
    wrote on last edited by
    #1

    I have two programs one written in VB.net and the other written in c++. the program written in c++ calling and passing arguments to VB.net program. let's say my VB.net program called DotNet.exe and c++ program as prog.exe here the function how prog.exe calls DotNet.exe lpStruct.lpParameters = "arg1 arg2 arg3" ; I used ShellExecuteEx(lpStruct) to call the DotNet.exe I got error at VB.Command() to read arguments passed by prog.exe and got the following error message The application attempted to perform and operation not allowed byt he security policy. etc. Can someone help me not to get this error message when my c++ program call my vb.net program.? Thanks

    S 1 Reply Last reply
    0
    • P pnpfriend

      I have two programs one written in VB.net and the other written in c++. the program written in c++ calling and passing arguments to VB.net program. let's say my VB.net program called DotNet.exe and c++ program as prog.exe here the function how prog.exe calls DotNet.exe lpStruct.lpParameters = "arg1 arg2 arg3" ; I used ShellExecuteEx(lpStruct) to call the DotNet.exe I got error at VB.Command() to read arguments passed by prog.exe and got the following error message The application attempted to perform and operation not allowed byt he security policy. etc. Can someone help me not to get this error message when my c++ program call my vb.net program.? Thanks

      S Offline
      S Offline
      Shinde Vikram
      wrote on last edited by
      #2

      :cool: i think so that you are calling a function from the .exe file why don't you go for the .dll file?:confused: as per my experience there is no method to call a function from a .exe file :~ If this is the case then Microsoft should provide .exe files for interlinking :-D Better way you create a .dll and get the function called :cool: VickyMD A Specialist in Message Digest Security

      P 1 Reply Last reply
      0
      • S Shinde Vikram

        :cool: i think so that you are calling a function from the .exe file why don't you go for the .dll file?:confused: as per my experience there is no method to call a function from a .exe file :~ If this is the case then Microsoft should provide .exe files for interlinking :-D Better way you create a .dll and get the function called :cool: VickyMD A Specialist in Message Digest Security

        P Offline
        P Offline
        pnpfriend
        wrote on last edited by
        #3

        you are correct.. I can write dll. but i had already written in VB .Net so if i can find out the way of solving the problem then I don't have to write the dll again. but I had tried using ShellExecuteEx to call the second program and passing arguments with Visual Studio 6.0. and HAD no problem. but after I upadated those programs to .Net and I got error message on VB.Command() to read the arguments, which are passed by first program (written in c++) in the second program. the error message is telling The application attempted to perform and operation not allowed by the security policy. The operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy administration tool I click on HELP on the error message and I went to Microsoft .Net security policy administration tool and did all the steps as I found in HELP. Then it works.. I had no more error and the programs are running as I wanted. by the way.. all the programs are on shared drived. BUT the problem is I can't do anything from different machine.. the programs are only running perfectly from my machine.. not from other machine. and everybody else also has the permission to access that Shared Drive. So I dont' really understand why I'm getting error running the same programs which are perfectly running from my machine?

        S 1 Reply Last reply
        0
        • P pnpfriend

          you are correct.. I can write dll. but i had already written in VB .Net so if i can find out the way of solving the problem then I don't have to write the dll again. but I had tried using ShellExecuteEx to call the second program and passing arguments with Visual Studio 6.0. and HAD no problem. but after I upadated those programs to .Net and I got error message on VB.Command() to read the arguments, which are passed by first program (written in c++) in the second program. the error message is telling The application attempted to perform and operation not allowed by the security policy. The operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy administration tool I click on HELP on the error message and I went to Microsoft .Net security policy administration tool and did all the steps as I found in HELP. Then it works.. I had no more error and the programs are running as I wanted. by the way.. all the programs are on shared drived. BUT the problem is I can't do anything from different machine.. the programs are only running perfectly from my machine.. not from other machine. and everybody else also has the permission to access that Shared Drive. So I dont' really understand why I'm getting error running the same programs which are perfectly running from my machine?

          S Offline
          S Offline
          Shinde Vikram
          wrote on last edited by
          #4

          :cool: hi there well there is not a problem with .NET actually .NET is platform independent there a special level of security implemented in .NET Operating systems and runtime environments typically provide some form of isolation between applications running on the system. This isolation is necessary to ensure that code running in one application cannot adversely affect other unrelated applications. Typically, isolation means A) Faults in one application cannot affect other applications by bringing down the entire process. B) Applications can be independently stopped and debugged. C) Code running in one application cannot directly access code or resources from another application; doing so could introduce a security hole. D) The behavior of running code is scoped by the application it runs in. In modern operating systems, this isolation has historically been achieved using process boundaries. A process runs exactly one application and that process scopes the resources that are available for that process to use. For example, memory addresses in Win32 are process relative---a pointer in one process is meaningless in the context of another process. The Common Language Runtime relies on the fact that code is type safe and verifiable to provide fault isolation between domains. By relying on the type safe nature of the code, application domains provide fault isolation at a much lower cost than the process isolation used in Win32. Because isolation is based on static type verification, there is no need for hardware ring transitions or process switches. In many respects, application domains are the Common Language Runtime equivalent of a Win32 process. The runtime creates an application domain for each runtime application; each application domain can have an associated configuration file. Application domains isolate separate applications which run within a process. The combination of an application domain and configuration information create isolation for the application The way in which application domains are created affects the permissions which assemblies have when running in the domain. For basic web-application scenarios, where the web page does not provide a LINK tag to a configuration file, the runtime creates an application domain on a per-site basis. Domain-neutral assemblies are only shared between application domains and assemblies with identical permission sets. A domain-neutral assembly called by two application domains with dissimilar permission sets is

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups