473,378 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using Microsoft.VisualBasic.Logging from a C# .Net 2.0 aspx page?

Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListene r"
from a set of C# aspx web pages, but I can't seem to use:

<%@ Import Namespace="Microsoft.VisualBasic.Logging" %>

I get a compilation error (Compiler Error Message: CS0234: The type or
namespace name 'Logging' does not exist in the namespace
'Microsoft.VisualBasic' (are you missing an assembly reference?)).

I can import the "Microsoft.VisualBasic" namespace OK, but that doesn't help
with using FileLogTraceListener.

I think this must be something simple I'm missing.... any ideas?

Thanks,
Tom Kearney
Jun 7 '06 #1
1 4791
It looks like you are using "script only" ASPX pages. In a regular
codebehind model, you would set a reference in the solution explorer
"References" section to the Microsoft.VisualBasic assembly. Then, you would
use the
using Microsoft.VisualBasic.Logging; directive at the top of your codebehind
class.

Finally,

protected void Page_Load(object sender, EventArgs e)
{
Microsoft.VisualBasic.Logging.FileLogTraceListener fltl = new
FileLogTraceListener();

Hope that helps.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tom Kearney" wrote:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListene r"
from a set of C# aspx web pages, but I can't seem to use:

<%@ Import Namespace="Microsoft.VisualBasic.Logging" %>

I get a compilation error (Compiler Error Message: CS0234: The type or
namespace name 'Logging' does not exist in the namespace
'Microsoft.VisualBasic' (are you missing an assembly reference?)).

I can import the "Microsoft.VisualBasic" namespace OK, but that doesn't help
with using FileLogTraceListener.

I think this must be something simple I'm missing.... any ideas?

Thanks,
Tom Kearney

Jun 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using...
6
by: Nathan Kovac | last post by:
Yesterday afternoon I was getting the following errors in a windows service: 'DatabaseManager.DataComponent', 'Error', '3 Errors: Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found...
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
7
by: SparkPlug | last post by:
Does anyone know why I might be getting an XmlSchemaException in App.config configured as below to use the UIP Application Block? I get the following error for every element, sub-element and...
9
by: KenLee | last post by:
I made an application which includes classic asp page and asp.net page. when I tried to redirect from classic asp page to asp.net 2.0 page, it works under my local IIS directory. ex) <a...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
2
by: Ronald S. Cook | last post by:
Hi, Some users on our domain can run our WCF application no problem. Some get an unhandled exception error re: SOAP security negotiation. I'm wanting the service to not be secure.. I just want...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.