cancel
Showing results for 
Search instead for 
Did you mean: 

Code unable to find namespace after setting up new IIS

Cameron_Gray
Champ on-the-rise
Champ on-the-rise

Hey guys,

We have some internet banking C# scripts that utilize the Unity API to pull check images, deposit images, statements, etc. from OnBase and display them in the browser to a user making the call.

We have a new web server that is going to be used for OnBase 15+, and while trying to test the scripts I keep getting a compilation error:

"Error CS0246: The type or namespace name 'InternetBankingUnity' could not be found (are you missing a using directive or an assembly reference?)"

The above error is what is returned in the browser when trying to test a URL to retrieve a check image using our Checks.aspx.cs file. The line that is referenced in the above error is as follows:

InternetBankingUnity.OBUnityC OB_Unity = new InternetBankingUnity.OBUnityC();

Now, the confusion I have is that this is setup exactly how it is at many of our other sites. Our UnityC.cs file resides in the App_Code folder in the location of the other scripts. This is a very small exerpt from the script showing the namespace and class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Hyland.Types;
using Hyland.Unity;
using System.IO;
using System.Configuration;
using System.Collections;
using System.Drawing;

namespace InternetBankingUnity

{

public class OBUnityC


{

In the bin folder, we have the following DLLs:

- Hyland.Types.dll

- Hyland.Unity.dll

- stdole.dll

- Interop.DMCOREX.dll (not used)

- Interop.OPB4_DESKTOPLib.dll (not used)

- Interop.OnBaseLib.dll (not used)

Looking for any advice on why this would work at every other site but not this one site in particular.

Thanks,

Cameron

1 ACCEPTED ANSWER

Rob_Herman
Star Contributor
Star Contributor

Have you verified that checks.aspx.cs has a using statement for InternetBankingUnity, and that its project contains a reference to the project with InternetBankingUnity?


Looking at the bin folder is probably not useful in this case; it would provide the results of compilation, but it sounds like your process is not getting as far as finishing the compilation.

View answer in original post

9 REPLIES 9

Rob_Herman
Star Contributor
Star Contributor

Have you verified that checks.aspx.cs has a using statement for InternetBankingUnity, and that its project contains a reference to the project with InternetBankingUnity?


Looking at the bin folder is probably not useful in this case; it would provide the results of compilation, but it sounds like your process is not getting as far as finishing the compilation.

Hey Rob -

Thanks for the response. That's the confusing part to me. Even in our test system, the checks.aspx.cs script doesn't have a using statement for InternetBankingUnity and it is working just fine. Here is a clip from the checks.aspx.cs that is working in our test system:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Collections;
using System.Text;

public partial class _default : System.Web.UI.Page
{


This file is located at C:\inetpub\wwwroot\TestIB\Checks.aspx.cs

The UnityC.cs file that is being used to actually connect to Unity API, etc is located at C:\inetpub\wwwroot\TestIB\App_Code\UnityC.cs.

These are the same scripts being used at the other site. I am quite confused why there would be compilation errors at one site but not the other.

A quick update -

If I try and do using InternetBankingUnity in the Checks.aspx.cs file, it says that same CS0246 error and references the using InternetBankingUnity line.

Is your InternetBankingUnity class in the same project as Checks.aspx.cs?
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.