VS.NET 2010 (and above) Users Click Here   

HOMECONTACT PRODUCTS DOWNLOADS PURCHASE TESTIMONIALS FORUMS COMPANY CONTACT
Home
Products
Downloads
Purchase
Licensing
Licensing FAQ
Software Updates
Support Forums
Testimonials
Feature Requests
Guarantee
About Us
Contact Us
Hosting Companies
Privacy Policy
   
Shopping Cart



BC30002: Type 'aspNetMHT.MHT' is not defined

by Dave 3. March 2011 11:58

I recently had a potential aspNetMHT customer email me with the following error.

BC30002: Type 'aspNetMHT.MHT' is not defined

Their entire code page looked like:

 
<%@ Page Language="vb" AutoEventWireup="true" %>
<script runat=server>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
    Dim url As String = "http://www.google.com"
 
   'create a MHT object referencing google.com
    Dim m As New aspNetMHT.MHT(url)
 
    'parses the url into it's MHT parts
    m.Parse()
 
    'create a zipped MHT file of google.com
    Dim filename As String = "google.zip"
 
    'save it the filesystem. You will need write permissions to do this
    m.SaveToFile(Server.MapPath(filename), True)
 
    Response.Write(String.Format("Dowload the MHT file <a href='{0}'>here</a>", filename))
 
End Sub
</script>

For anyone else out there, the resolution is as follows:

a)Be sure you import/upload the aspNetMHT.dll into your /bin directory
b)Add the following commands at the top of the .aspx page
<%@ Assembly Name="aspNetMHT"%>
<%@ Import Namespace="aspNetMHT" %>

This will set a reference to the aspNetMHT.dll assembly
(notice the .dll extension is missing from the @Assembly directive), and it imports the aspNetMHT namespace.

Comments are closed

 

 

Testimonial

Sweet, that worked thank you so much for your help solving this problem. I have to say that your company has some of the best customer service I have ever worked with. Thank you again for all your help. "

J. Shore | DePauw University

Read more testimonials
ListNanny aspNetDNS aspNetEmail aspNetPOP3 aspNetMX IPMuncher aspNetMIME aspNetPING aspNetTraceRoute aspNetIMAP aspNetMHT