Calling native code

Discussion in 'ASP.NET / ASP.NET Core' started by RobertHF, Mar 17, 2013.

  1. Hello,

    I've just signed up to DiscountASP.Net. I'm a software developer, but reasonably new to web development, and I'm trying to get an overview of what security restrictions there are in terms of what can be done in code-behind on a web page as compared to a desktop application.

    For example:

    Am I free to place native C or C++ dlls on my site and call them from C# using interop? If so, are there any requirements on how dlls should be built (I'm using Visual Studio 2012)?

    Can I call into standard Windows dlls (i.e. Windows dlls that might typically be accessed in a desktop application) using interop?

    Thanks for any advice. I realise the question has probably been asked many times, but if someone could point me to an overview of these issues it would be much appreciated.
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Interop will not work as I believe it requires Microsoft Office to be installed.
     
  3. Sorry, I used the wrong terminology, I meant P/Invoke. Given that correction, would I be able to do what I asked in my original post?
     
  4. dmitri

    dmitri DiscountASP.NET Staff

    Executing native code is not allowed on our shared production environment. Only managed code written in ASP.NET language can be executed from the Bin folder of a web application.
     

Share This Page