.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Use the log4net provider instead of standard IO for the log provider

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
I need to log entries  into a log file.This should be done in the data access layer.At present, I am using the standard IO for making the log entries.But I need to use the log4net provider instead of standard IO for the log provider.I have added the log4net as a reference to my project.Can anyone explain how to achieve this..?

View Complete Post

More Related Resource Links

Building a LINQ Provider

Throughout this article, we will build a simple IQueryable provider similar to the LINQ to SQL provider demonstrating what is needed to build a custom provider that is capable of executing LINQ queries and performing create, update and delete operations.

Membership Provider Conn String


Hello. I've bee successfully using the Asp.Net Membership Provider in my VB.Net 3.5/SQL 2005 web app for a year now (Site A). However, I've added 2 new sites (B and C) (both with their own DB) and now I see a problem. It looks like users that get created for sites B and C also get created in site A. Roles that I create for B and C only get created in A. I think it is a conn string problem.

When I created A, I adde the conn string to my machine.config (not sure why I did this or if it is even needed)...


         <add name="LocalSqlServer" connectionString="Data Source=VS689\SQLEXPRESS;Initial Catalog=SiteA;USER ID=sa;PASSWORD=123456"/>


                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=blahblah" connectionStringName="LocalSqlS

Which is the best sql provider?


Which is the best sql provider on .NET Framework : DataSet, LINQ, ADO.NET Entity Framework?

Provider Error




I have a web application and a business class library where all database connections are made. Not periodically but quite often, I get an error in the class library when i execute an oledbcommand. I have no problem defining and opening a connection but as soon as I try to execute a command or fill a table by an oledbadaptor, I get this error:

'SQLOLEDB' failed with no error message available, result code: E_FAIL(0x80004005)

After getting this error, when I reset IIS, everything starts to work perfectly but after a while, the same problem occurs again.

Does anyone have a clue about what might cause this problem?

Thanks in advance



Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

ERROR [HY000] [Informix .NET provider][Informix]Database locale information mismatch


Hi, there is an upgrade to my infimacs server and my web application encounter this error after the infimacs is upgraded.

Below is the information on the server before/after the upgrade.

Before            After

---------       -----------  

Solaris 8      Solaris 10

IDS 9.40     IDS 11.50

The web server where the web application hosted is running IBM Informix Connect 2.81. There is no such error before the upgrade is done.

As a developer, i have IBM Informix Client-SDK 2.90 installed on my local pc and debug the page where the read is needed from infimacs but no such error found.

The error come out only when it is hosted on the web server where IBM Informix Connect 2.81 is installed.

I have gone through many articles and it suggest me to set the environement  variable in the server :  DB_LOCALE=en_us.819.

I haven't try this solution but i think that this might not be the best solution.

Is it possible to to to have this settin

Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

The provider does not support searching and cannot search


Hi All,

I am having some trouble with searching on Active Directroy.

Here is the code I used to connect to Active Directory.


DirectoryEntry de = new DirectoryEntry( "LDAP://subdomain.domain.co.uk/rootDSE", ConfigurationManager.AppSettings[

WCF The Security Support Provider Interface (SSPI) negotiation failed


I am using a wcf service that I created, when both hosting machine and the client machine are on the same domain everything works just fine. When I publish the client app to the webserver in the DMZ I am getting the following error:

SOAP security negotiation with '' for   
'' failed. See inner exception  
for more details.The Security Support Provider Interface (SSPI) negotiation failed.

Here is my service main where I set up the service


 Uri baseAddress = new Uri("Http://");
      ServiceHost selfHost = new ServiceHost(typeof(QBService), baseAddress);


Membership provider for MS Access in VB


Hi all,

Over the past few weeks I've been attempting to convert the readily available C# code for the Membership Provider etc whilst working with MS Access. I'm fairly experienced with VB unlike C# and have ran AccessMembershipProvider.cs, AccessConnectionHelper.cs and so on through 3 different converters. All of which have given a varying degree of errors, all of which I've fixed, either by ever so slightly re-writing the logic or in the Cryptographic case finding a working translation.

This evening I have fixed all of the errors from all of the now converted VB files (which I was pretty pleased about as you can imagine), I then created a simple login page to test this out, added a new user to the system and tried to login to find out I'm being told the username or password is wrong.

Just to clarify, the converters all had an error or two or even more in some cases which I've bypassed but now I can't login - at all!!

Any initial suggestions?

Finally I've written reams of code over the years and am really stumped on this one, has knowone actually successfully converted these files from C# to VB and actually got it working?? I'm not looking for someone to send me there hard work but I am almost at the point of not wanting to bother with it anymore and I just can't believe that it's not out there to download

Fuzz Testing: Create a Custom Test Interface Provider for Team System


Dan Griffin shows the extensibility of Visual Studio 2005 Team Edition for Software Testers by discussing the modification of the existing Test Interface Provider sample in the latest Visual Studio SDK and implements Fuzz Testing.

Dan Griffin

MSDN Magazine November 2007

Cutting Edge: A Provider-Based Service for ASP.NET Tracing


When it comes to catching programming errors, the debugger is a developer's best friend. ASP. NET tracing, however, is a nice complement to the debugger and shouldn't be overlooked. It enables your ASP.

Dino Esposito

MSDN Magazine June 2006

Wicked Code: The SQL Site Map Provider You've Been Waiting For


Now that ASP.NET 2.0 is a shipping product, it seems appropriate to revisit an issue that tops the new features wish lists of many developers: a SQL ServerT site map provider.

Jeff Prosise

MSDN Magazine February 2006

Timers: Implement a Continuously Updating, High-Resolution Time Provider for Windows


The timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware. At times, such as when you need to timetag frequent events, it is desirable to achieve a higher resolution. For example, what if you want to be able to contact a thread or perform some other task at intervals more frequent than 10 milliseconds? Suggested ways of achieving better resolution include using performance counters in conjunction with the sytem time to calculate smaller time increments. But using performance counters is a technique that presents its own problems. This article shows one possible way of overcoming limitations inherent in this approach.

Johan Nilsson

MSDN Magazine March 2004

ADO.NET: Building a Custom Data Provider for Use with the .NET Data Access Framework


The System.Data.dll assembly in the .NET Framework contains namespaces whose base classes can be used to create custom data providers. These namespaces also define a number of data access interfaces and base classes that let developers create data providers that will interoperate with other custom providers. Using the ADO.NET classes Connection, Command, DataReader, and DataAdapter, writing a provider is easier than writing one for OLE DB. This article explains these classes and their implementation, and how they can be used to write a variety of different kinds of data providers.

Bob Beauchemin

MSDN Magazine December 2001

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend