---
title: "Your first DocuVieware ASP.NET Web Forms page"
canonical_url: "https://www.nutrient.io/guides/docuvieware/asp-dotnet-web-forms/your-first-docuvieware-asp-dotnet-web-forms-page/"
md_url: "https://www.nutrient.io/guides/docuvieware/asp-dotnet-web-forms/your-first-docuvieware-asp-dotnet-web-forms-page.md"
last_updated: "2026-05-18T15:55:45.958Z"
description: "Integrate DocuVieware into your ASP.NET Web Forms project and set up the necessary references for successful implementation."
---

# Your first DocuVieware ASP.NET Web Forms page

This guide shows how to integrate DocuVieware into a newly created C# ASP.NET Web Forms project.

**Requirements** —.NET Framework 4.6 or above

**Note** — Screenshots were taken using Visual Studio 2015 and GdPicture.NET 14. They may differ from the current release.

## Empty project creation

Start with the **File** > **New** > **Project...** menu. Then choose **Web** > **ASP.NET Web Application**. In this guide, you’ll be working on DocuVieware Demo, a new ASP.NET 4.5 Web Forms project.![New ASP.NET Web Application dialog in Visual Studio](@/assets/guides/docuvieware/tutorial1.png)

> Depending on your Visual Studio version, your project may not include a `Global.asax` file. If it doesn’t, add one using **Add** > **New Item...**. Then select **Global Application Class** in the list.

The screenshot below shows the resulting structure.![Project structure in Solution Explorer showing Default.aspx, Global.asax, and Web.config files](@/assets/guides/docuvieware/tutorial2.png)

Now that the project structure is complete, the next step is to add project references.

## Adding mandatory references

Add the following references:

- `GdPicture.NET.14.WEB.DocuVieware.dll`, which is found in `[INSTALLATION FOLDER]\Redist\DocuVieware` (.NET Framework 4.6)

- `System.Web.Http` from the Microsoft ASP.NET Web API

> The `System.Web.Http` namespace may not be directly available on your system. It requires Microsoft ASP.NET Web API to be installed first.

To install it, run the following command in the **Package Manager Console** (**Tools** > **NuGet Package Manager** > **Package Manager Console**):

```bash

PM> Install-Package Microsoft.AspNet.WebApi

```

> Add `Newtonsoft JSON`. Even though it may already be in the references, the version is likely outdated and will cause an error at runtime.

In the **Package Manager Console**, run the following command:

```bash

PM> Install-Package Newtonsoft.JSON

```

The project references should look as follows once the two references have been added.![Project references in Solution Explorer showing GdPicture and System.Web.Http references](@/assets/guides/docuvieware/tutorial3.png)

> Ensure that the `GdPicture.NET.14.Web.DocuVieware` reference is marked as `Copy Local : True` in its properties window. For more information, refer to the [Copy Local property documentation](https://msdn.microsoft.com/library/t1zz5y8c(v=vs.100).aspx).![Reference properties window showing Copy Local set to True](@/assets/guides/docuvieware/tutorial4.png)

Extra libraries are mandatory for deployment. These files are found in `[INSTALLATION FOLDER]\Redist`:

- `GdPicture.NET.14.filters.dll` (for 32-bit execution)

- `GdPicture.NET.14.filters.64.dll` (for 64-bit execution)

- `GdPicture.NET.14.image.gdimgplug.dll` (for 32-bit execution)

- `GdPicture.NET.14.image.gdimgplug.64.dll` (for 64-bit execution)

- `GdPicture.NET.14.Imaging.Rendering.Skia.dll` (for 32-bit execution)

- `GdPicture.NET.14.Imaging.Rendering.Skia.64.dll` (for 64-bit execution)

- `GdPicture.NET.14.jbig2.encoder.dll` (for 32-bit execution)

- `GdPicture.NET.14.jbig2.encoder.64.dll` (for 64-bit execution)

Add them to the project using the **Add** > **Existing item...** menu. Once done, set the **Build Action** property to **Content** and the **Copy to Output Directory** property to **Copy always** for each file.![Build Action and Copy to Output Directory properties for DLL files](@/assets/guides/docuvieware/tutorial5.png)

## Licensing and configuring

Now that the references are properly set, go into `Global.asax.cs`, add the mandatory import, and handle the licensing and configuration of DocuVieware.

> Sample source code is available here: `[INSTALLATION FOLDER]\Samples\ASP.NET\DocuVieware\aspnet-webform\_app\Global.asax.cs`.

Below is the mandatory import to add:

### C#

```csharp

using GdPicture14.WEB;

```

### VB.NET

```vb

Imports GdPicture14.WEB

```

To unlock DocuVieware, add a call to the `RegisterKEY()` method in the `Application_Start` event. Then enter your license key in the method.

### C#

```csharp

DocuViewareLicensing.RegisterKEY("XXXX"); // Unlocking DocuVieware
// Replace "XXXX" with your actual license key.

```

### VB.NET

```vb

DocuViewareLicensing.RegisterKEY("XXXX") ' Unlocking DocuVieware
' Replace "XXXX" with your actual license key.

```

To set up the configuration of DocuVieware, add a call to the `DocuViewareManager.SetupConfiguration()` method in the `Application_Start` event. First, create a new folder in the project for the cache. For clarity, name it `Cache`.

### C#

```csharp

DocuViewareManager.SetupConfiguration(true, DocuViewareSessionStateMode.InProc, HttpRuntime.AppDomainAppPath + "\\Cache");

```

### VB.NET

```vb

DocuViewareManager.SetupConfiguration(true, DocuViewareSessionStateMode.InProc, HttpRuntime.AppDomainAppPath + "\\Cache")

```

The screenshot below shows what the file should look like.![Global.asax.cs file with licensing and configuration code](@/assets/guides/docuvieware/tutorial6.png)

> Sample source code is available here: `[INSTALLATION FOLDER]\Samples\ASP.NET\DocuVieware\aspnet-webform\_app\Global.asax.cs`.

## DocuVieware integration

**Steps:**

1. Add the assembly registration to the page so you can add a DocuVieware control on it. Below is the ASP.NET code to add:

   ```aspnet

   <%@ Register Assembly="GdPicture.NET.14.WEB.DocuVieware" Namespace="GdPicture14.WEB" TagPrefix="cc1" %>
   ```

2. Add the following DocuVieware control to `Default.aspx`:

   ```aspnet

   <cc1:DocuVieware ID="DocuVieware1" runat="server" Height="800px" Width="1000px" />
   ```

   DocuVieware now has a fixed size of 1000×800 pixels.

The screenshot below shows how the page source code looks.![Default.aspx page with DocuVieware control markup](@/assets/guides/docuvieware/tutorial7.png)

The integration is complete. Start the project and load documents in DocuVieware.
---

## Related pages

- [Client/server coming and going with custom actions](/guides/docuvieware/asp-dotnet-web-forms/client-server-coming-and-going-with-custom-actions.md)
- [ASP.NET Web Forms integration](/guides/docuvieware/asp-dotnet-web-forms.md)
- [Use and handling of the selection area](/guides/docuvieware/asp-dotnet-web-forms/use-and-handling-of-the-selection-area.md)
- [Custom snap-in implementation](/guides/docuvieware/asp-dotnet-web-forms/custom-snap-in-implementation.md)

