Microsoft has defined that you cannot use the overloaded syntax for the tag to load .NET user controls into Microsoft Internet Explorer from the file system because of security concerns. Therefore if you want to host the .NET version of DicomViewer object, you have to register it into the GAC (Global Assembly Cache) before you can use it, in the same way that you use the COM version Viewer object.

Here are the steps to follow:

  1. Open C:\WINDOWS\Assembly and drag DicomObjects.NET.x.y.dll into it. (SKIP this under windows 7)

  2. Open the Visual Studio Command Prompt and Type in

    RegAsm "C:\MedicalConnections\DicomObjects.NET\DicomObjects.NET.x.y.dll"

    assuming that C:\MedicalConnections\DicomObjects.NET is the folder where you keep the DLL. If successful, you should have a “Types registered successfully” message. Please NOTE, you need admininstrator privileges to do this.

  3. If you are using Window 7 or above then also run:

gacutil -i "C:\MedicalConnections\DicomObjects.NET\DicomObjects.NET.x.y.dll" (gacutil is included in the Microsoft Windows SDK)

Use the ClassID for creating the Viewer object, for example D0CC2EF0-B707-42ba-8FA7-1DF567D3CD6B (the ClassID may change with different major versions of DicomObjects)

<OBJECT id="Viewer1" classid="clsid:D0CC2EF0-B707-42ba-8FA7-1DF567D3CD6B"...>

Then you should be able to see and use the viewer object in your browser, as if it is the COM object.

Sample HTML code which has been tested:

<html>
<body>
   <object id="myViewer" classid="CLSID:D0CC2EF0-B707-42ba-8FA7-1DF567D3CD6B" 
           style="width: 727px; height: 520px; background-color: black"
           codebase="DicomObjects.NET/DicomObjects.NET.2.0.dll" name="myViewer">
   </object>
   
   <script type="text/vbscript" language="vbscript">
       sub window_onLoad()
           myViewer.Images.read("C:\1")
       end sub 
   </script>
</body>
</html>