Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:16:29+00:00 2026-05-29T21:16:29+00:00

Hi I have a C Dll which will interact with a cobol application. we

  • 0

Hi I have a C Dll which will interact with a cobol application. we want to send the data to the cobol through internet.

so i created an C# DLL which will call the C DLL. its working fine when i do a consoleapp, but when i try to call the same DLL from ASP.NET its giving error message

i dont understand that error

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

There are some other posts regarding this but those were not matching my context
i think im missing permissions for asp.net

this is the declaration in my c# dll for calling c dll

[DllImport(@"C:\CCExpert\haz450cp.dll", EntryPoint = "Methodname", CallingConvention = CallingConvention.Cdecl)]
    unsafe public static extern void Methodname(ref p1, ref p2);

Edit:

Hi i changed the settings according to your suggestions but now im getting a new error

Microsoft Visual Studio C Runtime Library has detected a fatal error in w3wp.exe
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:16:32+00:00Added an answer on May 29, 2026 at 9:16 pm

    If you have a C .dll, it’ll be either 32-bit or 64-bit. You must make sure that your site is running in the correct platform for that (that is, your site is running as a matching 32/64-bit site.)

    In IIS 7, you can configure the bitness of the application pool by right-clicking the app pool and selecting Advanced Settings. There’s a setting called Enable 32-bit applications, you need to set that to True for 32-bit sites and False for 64-bit sites.

    You can use Dependency Walker to see if the DLL is 32-bit or 64-bit: use View full paths (looks like C:\ on the toolbar) and if the dependencies of your .dll and:

    • If you have a 32-bit OS, your .dll may be 64-bit. You won’t be able to load it.
    • If you have a 64-bit OS:
      • If the dependencies are under System32, it’s a 64-bit .dll
      • If the dependencies are under SysWOW64, it’s a 32-bit .dll

    That tells you how to set the application pool. To set the app pool you can check this link.

    Make sure you use Advanced Settings when you open the app pool properties, not basic settings. Also, these settings are not available when you bring up properties for your site – they are only available for the app pool.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a native regular C++ Dll which I want to call from C#
I'm working on an application so i have write an dll which contain a
I have a java project I want to create which will be built on
In my real application, I have a VB6 DLL which is called from classic
I have a dll with a c interface, the functions of which will return
I have a DLL which I have included in my C# project. Let's call
I have a DLL which needs to access data stored in STL containers in
I'm writing a web application that will have plugins. The plugins will be .DLL
I have created a C++/CLI mixed DLL which I am using from C# Winforms
I have a DLL which contains a class with static members . I use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.