One of the best online resource to Learn IT Skills Pluralsight
Impact-Site-Verification: 294dbebc-38ab-452d-92bd-67606e5c6f7c
Log4net integration
Hi folks,
I was integarting log4net library which is amazing for logging in .net Applications.
One issue i run into worth mentioning, I got following error
“log4net:ERROR Failed to find configuration section ‘log4net’ in the application’s .config file. Check your .config file for the and elements. The configuration section should look like: <section name="log4net""
When I used following declartion , issue resolved:
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
Regards
Nearbuy Discounted Coupons
Hi,
We don’t want to span user with lot of unnecessary information 🙂 but save their time by displaying active Nearbuy discounted coupons & Nearbuy Promo code.
Support us by buying from following Links.
Following coupon(s) will give you 10% discount(Only One time)
SAMSUNG10
CGURU10
dekho10
crani10
CD15
Following coupon(s) will give you 5% discount
BULK5
Hope it will save your time & money.
Support us by buying from above Links.
Enjoy saving!
Control cholesterol naturally
Food you can include in daily diet to control cholesterol naturally:
• Dark chocolate
• Avocados, avocado oil
• Red wine
• Green Tea
• almonds walnuts pista
• barley, oatmeal
• banana or apple
• fish (bake or grill)
• Olive oil
• soy milk, tofu
• bean, lentils
• pear, apple, oranges, berries
• eggplant, bhindi
• drink 2-3 ltrs of water (warm)
Ref: http://www.prevention.com/health/health-concerns/how-lower-cholesterol-naturally
ASP.NET HttpWebRequest POST returns “The remote server returned an error: (405) Method Not Allowed.”
I was facing issue in redirection in ASP.NET from SSO(Single Sign On) :
The IIS server produces the error for;
http://externalsite.com/WebSite
… but is happy with;
http://externalsite.com/WebSite/
http://externalsite.com/WebSite/Default.aspx
Find a Windows Process Name by Process ID
I come across an issue where my Apache process id default port was used by another process with ID 3432.
If you need to find the process name in Windows :
1. Go to Task manager
2. Click “Process” tab
3. Click Menu “View” and Select “Select Column” option
2. Select the “PID” option.
If you don’t know even the process ID which is conflicting your current process, then
1. Go to command prompt
2. type command: netstat -ano => It will list all all listening portswith the process ids.
Hope it may help few!
Store and Reading connection string in web.config
Handy Tips for freshers:
Connection string in .NET 3.5 (and above) config file:
Do not use appsettings in web.config. Instead use the connectionStrings section in web.config.
<add name="myConnectionString" connectionString="server=\SQLEXPRESS;database=myDb;uid=myUser;password=myPass;" />
To read/access the connection string into your code, use the ConfigurationManager class.
string connStr = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
Always store the connection string in a config file.
I saw many freshers save connection string on page(Hard Coding) or in session, Never be among them.
Connection string in .NET 2.0 config file
In the appSettings location, add a key named whatever you like to reference your connection string to.
To read the connection string from code, use the ConfigurationSettings class.
string connStr = ConfigurationSettings.AppSettings("myConnectionString");
Hope this will help few!
Ref: https://www.connectionstrings.com/store-connection-string-in-webconfig/
Using CSS to Style a RadioButtonList Control in ASP.NET
Hi,
I wanted to give styling to Radio list box.
Also wanted to highlight the radio span after selection.
Sharing the code for your reference:
CSS code:
.radioboxlist radioboxlistStyle
{
font-size:x-large;
padding-right: 20px;
}
.radioboxlist label {
color: #3E3928;
background-color:#E8E5D4;
padding-left: 6px;
padding-right: 16px;
padding-top: 2px;
padding-bottom: 2px;
border: 1px solid #AAAAAA;
white-space: nowrap;
clear: left;
margin-right: 10px;
margin-left: 10px;
}
.radioboxlist label:hover
{
color: #CC3300;
background: #D1CFC2;
}
input:checked + label {
color: #CC3300;
background: #D1CFC2;
}
In asp.net Server code:
<asp:RadioButtonList ID="RadioButtonListGarment" runat="server" CssClass="radioboxlist">
SQL SERVER – How To Delete Duplicate Records – Based on Rows
Heree is handy code I got from sqlauthority.com, for deleting the duplicate records from table.
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
Where DuplicateColumn1,DuplicateColumn2 etc are the columns on which you are checking for duplicate constraints.
Recent Comments