SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    asp.net and c++.net

    is there a way to use unmanaged code (c++.net) with asp.net?

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    It should be fine if u can compile it into a .dll and reference that in asp.net.

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, would execution be sluggish if i reference something in a dll rather than writing the code in c#?

    Do dll's stay resident in memory?

    can dll's handle being simultaneously called?

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    Nope, will not be slugish

    nope, dnt stay in memory

    yup, can be called simultaneously

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,629
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Actually, they do stay in memory if they are managed DLLs. At least until that app domain recycles.

    Calling unamanged code from .NET (managed) code is possible. And in fact necessary in some scenarios. But it should be avoided in general, especially in web applications. You need alot of code access extra permissions which web applications don't have by default.

    Furthermore, for 99% of all things one would do with a web application, a C++ library will not be so much faster than a managed library to be worth the trouble. Managed code is actually blazingly fast once you get past the first hit penalties. And web apps tend to be I/O and memory constrained before they are CPU constrained these days.

  6. #6
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where can I find more information on how to do this? I have search many websites and they all cover how to use DLLs. I dont want to use DLLs I want to do this through C# or the CLR.

    thanks for your responses


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •