Skip to main content

Use Dlls In HTML (JSP/PHP/ASP) (Use Windows Desktop Application in a Browser)

Use .DLLs in JSP/PHP (HTML) 

I have Divided in three Parts
  1. Download and Setup Microsoft .NET Framework 2.0 Configuration Setup
  2. Visual studio project (DLL)
  3.  JSP Page (Caller of DLL)

Setup Microsoft .NET Framework 2.0 Configuration Setup

  1. Download
  2. Click Control Panel->Administrative Tool->Microsoft .NET Framework 2.0 Configuration
  3. Expand My Computer by clicking the plus sign(+).
  4. Now Expand Runtime Security Policy
  5. Now Expand Runtime Security Policy
  6. Now Expand Machine
  7. Now expand Code Groups
  8. Now expand All_Code
  9. Click LocalIntranet_Zone

  1. Click Edit Code Group Properties
  2. Click Permission Set
  3. From the drop down select FullTrust
  4. Then click Ok
  5. Open the Internet Explorer go to tools à options à security.

  6. Click on the sites button; add following URL in trusted zone websites list, add ur url

Visual Studio Project

1.       Create a project windows form class library
2.       Add References of  all DLLs if used  like (someexternal.dll)
3.       Build application and get DLLs from debug folder
a.       If multiple DLLs created use ILMerge.exe for making it a single DLLs.
b.      Create .SNK file
c.       Put .SNK file in IL Merge Folder  (C:\Program Files\Microsoft\ILMERGE)
d.      Put all DLLs in ILMERGE Folder

4.       Make signed DLLs either using sn.exe or use ILMERGE. I  preferred ILMERGE
a.       Commands to signed DLLs using ILMERGE:
                                                               i.      ilmerge /out:softPhone.dll /keyfile:key.snk primary.dll            SecondryOrReferenced.dll log4net.dll
b.      Now your .Net application is ready for Java Client, Copy DLLs from ILMERGE Folder and paste in tomcat server folder.

JSP Page

Make separate folder for DLLs.
Use Object tag
<OBJECT id="Merged"   
classid="myDll.dll#myDllNamespace.UserControl1" width="100%">
Take care of name space for calling DLL main class
Now run on IE your JSP will now run.Net Application

Steps to Remember:

1.       We have made usercontrol therefore we have to call from a client there is no exe
2.       There is different path for for config file it is better to use my Documents folder as it is a public folder
System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\naushadlog.config")
3.       Dll must be signed
4.       Microsoft .NET Framework 2.0 Configuration must be installed and configured.
5.       Verify signed DLLs in GAC using following command
C:\Program Files\Microsoft Visual Studio 9.0\VC> gacutil /ldl


Popular posts from this blog

Add Image in Navigation Drawer Android Studio Template

I have to add Image in one of my project in slider Menu ,
I have used Android Studio Template Navigation Drawer  for material design .
For adding header on top of the list I have modified few lines in code: below are the simple steps:

Create an Android Studio project and select  Navigation Drawer Activity as shown below
Now your project structure is like this:

Now open activity_main.xml  and add LinearLayout and image view as shown below highlighted lines

< xmlns:android=""xmlns:tools="" android:id="@+id/drawer_layout"android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent"
android:layout_height="match_parent" />


[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.] Error: /Users/Naushad/IonicProjects/IonicApp/platforms/android/cordova/build: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:766:16) at Process.ChildProcess._handle.onexit (child_process.js:833:5)

sudo ionic build android
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.] Error: /Users/Naushad/IonicProjects/IonicApp/platforms/android/cordova/build: Command failed with exit code 2     at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)     at ChildProcess.emit (events.js:98:17)     at maybeClose (child_process.js:766:16)     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
to solve this i use following steps in terminal :
sudo chown -R Naushad /usr/local/lib/node_modules/cordova
still have same error than i do follwing step
export PATH=$PATH:/users/Naushad/android-sdks/tools  then i got below error  :) [Error: Please install Android target: "android-22".
Hint: Open the SDK manager by running: /users/Naushad/android-sdks/tools/android You will require: 1. "SDK Platform" for android-22 2. "Android SDK Plat…

Using GIT with Android Studio on windows with terminal or toolbar

Today We are going to learn how we can create a git repository using android studio.
Android Studio Makes it very simple just follow the below steps and your project is on git :
First we setup our PC ::

Download git from :

install it.

for git repository online I am using Bitbucket  , bitbucket allow us to host private repository free you can also use github but your project should be public if you want to use it free.

Here I am going to use bitbucket:
Create repository
After creating repository  you will see screen like this

Now open AndroidStudio Create new project.
after creating the project clcik on VCS on menu strip  and enable git as shown below

Now your project git enabled ;
You can see terminal in andoid studio we can use it for git commands.
Now check terminal and write git status if it  give you below message :
'git' is not recognized as an internal or external command, operable program or batch file.
then you have to follow below steps …