Knowledge Transfer

Monday, December 14, 2009

SQL Server Security Audit Report

If you don't have third party tools and need to go through many servers to provide this information it can be a hassle and very time consuming. So I put together a script to generate a report that I could just review. The script generates a report of all elevated level accounts and any possible security holes.

Solution
The script that I created does the following:

Lists who has 'sa' permissions

List which accounts have local administrator access

Lists type of logins that are used

Individual NT Login

Individual SQL Login

NT Group Login

If NT groups are being used a list of who is in the groups
Checks to see if any Windows accounts that are in SQL Server no longer exist
The last part shows if any user is using database roles and which roles
With a combination of Windows system commands and T-SQL, you can pull this information easily. This script works for SQL 2000, SQL 2005 and SQL 2008.

Please click this link you find more stuff for above Questions in SQLDBA.

http://www.mssqltips.com/tip.asp?tip=1881

Regards,
Uday.A

Labels: , , ,

Sunday, November 8, 2009

WCF,WF,WPF and LINQ For Objects,Linq for SQL, Linq for XML

Hi,
The Below i have attach all the Liks for LINQ,WCF,WF and WPF Example sites ... Please cut and paste ....Learn New things....


http://www.hookedonlinq.com/LINQtoObjects5MinuteOverview.ashx

http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx

http://weblogs.asp.net/scottgu/archive/2006/05/14/Using-LINQ-with-ASP.NET-_2800_Part-1_2900_.aspx

http://www.extensionmethod.net

http://www.biztalkgurus.com/liveplay/SequentialWorkflow/Sequential_Workflow_Video.aspx

Fault Contract

http://www.c-sharpcorner.com/UploadFile/ankithakur/ExceptionHandlingWCF12282007072617AM/ExceptionHandlingWCF.aspx

SOAP Fault Contract

http://www.c-sharpcorner.com/UploadFile/SunilBabuYLV/SOAPFaultContract08262008093633AM/SOAPFaultContract.aspx

DataContract Hierarchy
http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/datacontracthierarchywcf07102009092137AM/datacontracthierarchywcf.aspx

WCF Examples

http://www.c-sharpcorner.com/Articles/ArticleListing.aspx?SectionID=1&SubSectionID=192

Regards,
UdayaBhaskar.A

Labels: , , , , , , ,

Thursday, June 18, 2009

How to reverse string in C#

On this article, I will show you how to reverse a string in C#. Although this function is not often used in business applications, still you might need it someday. One use of it that I can think of, is including it as part of data encryption process. I'll show you two different functions, first the ReverseWord which will reverse a string by word and the ReverseWordChar that reverse string by each character.



Reverse string by word


public static string ReverseWord(string s)
{
int length = s.Length;
int i = 0;

string[] splittedArray = s.Split(' ');
StringBuilder sb = new StringBuilder();
for (i = splittedArray.Length - 1; i >= 0; i--)
{
if (i != 0)
sb.Append(splittedArray[i] + ' ');
else
sb.Append(splittedArray[i]);

}

return sb.ToString();
}



Reverse string by each character


public static string ReverseWordChar(string s)
{
int length = s.Length;
int i = 0,j=0;
StringBuilder sb= new StringBuilder();
int startPos = length - 1;

for (i = length-1; i >=0;i--)
{
if (s[i] == ' ')
{
for (j = i+1; j <= startPos; j++)
{
sb.Append(s[j]);
}
startPos = i;
sb.Append(' ');
}
}

for (j = 0; j < startPos; j++)
{
sb.Append(s[j]);
}

return sb.ToString();
}

Happy coding,
Uday.Adidham
Hyderabad carpool (www.hydcarpool.com)

How to reverse string in C#

On this article, I will show you how to reverse a string in C#. Although this function is not often used in business applications, still you might need it someday. One use of it that I can think of, is including it as part of data encryption process. I'll show you two different functions, first the ReverseWord which will reverse a string by word and the ReverseWordChar that reverse string by each character.



Reverse string by word


public static string ReverseWord(string s)
{
int length = s.Length;
int i = 0;

string[] splittedArray = s.Split(' ');
StringBuilder sb = new StringBuilder();
for (i = splittedArray.Length - 1; i >= 0; i--)
{
if (i != 0)
sb.Append(splittedArray[i] + ' ');
else
sb.Append(splittedArray[i]);

}

return sb.ToString();
}



Reverse string by each character


public static string ReverseWordChar(string s)
{
int length = s.Length;
int i = 0,j=0;
StringBuilder sb= new StringBuilder();
int startPos = length - 1;

for (i = length-1; i >=0;i--)
{
if (s[i] == ' ')
{
for (j = i+1; j <= startPos; j++)
{
sb.Append(s[j]);
}
startPos = i;
sb.Append(' ');
}
}

for (j = 0; j < startPos; j++)
{
sb.Append(s[j]);
}

return sb.ToString();
}

Happy coding,
Uday.Adidham
Hyderabad carpool (www.hydcarpool.com)

Tuesday, June 2, 2009

Fundamental concepts for Javascript

Fundamental concepts for Javascript

Click Here More on Javascript Examples


Regards,
Uday.Adidham
www.hydcarpool.com

Labels: ,

Friday, May 29, 2009

Using Enterpraise Class Library in ASP.Net 2.0

ADO .NET provides many rich features that can be used to retrieve and display data in a number of ways, but even given such flexibility, sometimes developers find themselves repeating the same code again and again. For example, every data-driven application requires access to a database. You need to write code to connect to the database, open a connection, execute dynamic SQL or stored procedures, retrieve the results, and close the connection. In other words, this is "plumbing" code that you will be forced to write in almost any application you develop, even though it doesn't add any value to the core business users.

Some Useful Links Below Here

http://www.devx.com/dotnet/Article/30910/0/page/1

Enterpraise Class Library

Enterpriase Library Part2

Enterpriase class Library,WCF,WPF,WWF and More Videos (Author : Shivprasad Koirala )

if you some useful links on this topic please post i will update my BLOG along with your Link.

Regards,
Uday.A
Www.hydcarpool.com

Labels: , , , , ,

Monday, May 25, 2009

Regular Expression in ASP

# Removing HTML Tags
# Removing Attributes From Html Tags
# Removing Empty HTML Tags
# Regex / Preg_replace :: Removing All Tags From A String
# Grabbing Html Tags Out Of String
# Detect HTML Tags In The String

CLICK HERE

Regards,
uday.A

For Membership Provider base /SQL Provider base Example,WebServices

For Webservices in asp.net

Click Here For more Webservice Concepts


For Membership Provider base /SQL Provider base Example

Click here for Authentication

For Good Technical .Net Videos Link

Click Here

Regards,
Uday.adidham

Wednesday, May 13, 2009

Passing Values between User Controls and ASPX Page

This article is for beginners who are learning. NET.This will be really helpful for them. Beginners will be wondered how to pass values between User Controls and ASPX page. In this article I have listed some of the ways through which you can access and set the User control values in an ASPX page. I started of with some of the basics, advantages and disadvantages of user controls.

Click Here For More info....

Reagrds,
uday.A

Labels:

Thomson Retures Interview Questions

Requirement : .Net Developer

1)OOPs Concepts (Encapsulation,Abstraction,Polymorphisam,Object)
2)Overriding with Example
3)Connection string in ADO.Net
4)Diff B/w Oledb Provider and sql client
5)One DataBase table Desing with u r own Plan For "Many to many and Many to One" model
6)how to get the return value from function in C#
7)REF and OUT in C#
8)View State in asp.net
9)Page life cycle
10)WCF and WPF and WF indepth
11)AJAX Fundamentals

Reagrds,
uday.A

Gridview ,Details View,Fromviews,Repeater,Datalist Controles in ASP.Net

GridView Control

The GridView control displays data as a table and provides the capability to sort columns, page through data, and edit or delete a single record. the GridView control offers improvements such as the ability to define multiple primary key fields, improved user interface customization using bound fields and templates, and a new model for handling or canceling events

DetailsView Control

The DetailsView control renders a single record at a time as a table and provides the capability to page through multiple records, as well as to insert, update, and delete records. The DetailsView control is often used in master-detail scenarios where the selected record in a master control such as a GridView control determines the record displayed by the DetailsView control.

FormView Control

The FormView control renders a single record at a time from a data source and provides the capability to page through multiple records, as well as to insert, update, and delete records, similar to the DetailsView control. However, the difference between the FormView and the DetailsView controls is that the DetailsView control uses a table-based layout where each field of the data record is displayed as a row in the control. In contrast, the FormView control does not specify a pre-defined layout for displaying a record. Instead, you create templates that contain controls to display individual fields from the record. The template contains the formatting, controls, and binding expressions used to lay out the form.

Repeater Control

The Repeater control renders a read-only list from a set of records returned from a data source. Like the FormView control, the Repeater control does not specify a built-in layout. Instead you create the layout for the Repeater control using templates.

DataList Control

The DataList control renders data as table and enables you to display data records in different layouts, such as ordering them in columns or rows. You can configure the DataList control to enable users to edit or delete a record in the table. The DataList control differs from the Repeater control in that the DataList control explicitly places items in an HTML table, where as the Repeater control does not.

Regards,
Uday.A

Labels: , , , ,

Wednesday, April 22, 2009

XML Reading and writing

XML Reading and Writing.

http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=96


Happy coding
uday.adidham

Labels: , , ,

Wednesday, April 8, 2009

Join Hands for Reducing the Expenses in Recession...Save Fuel..Save Environment..Save Hyderabad..

Hi,
We recently lanched the www.hydcarpool.com for Hyderabd people for Reducting the Expenses in the recession time for shareing the Car/Bike From your Home area to Offcie Area and Vice versa.... Let's Join Hands for partcipating in this Event....Log on to www.hydcarpool.com



Regards,
UdayaBhaskar.A

Thursday, February 19, 2009

Simple 3-tier arch for gridview in asp.net 2.0

Hi DotnetGems,
Please watch this website for 3-tier architure with in asp.net with gridview.

http://www.codedigest.com/Articles/ASPNET/187_How_to_create_a_website_using_3_tier_architecture.aspx

Happy coding

Wednesday, January 7, 2009

What is Jquery?

What is JQuery?
jQuery is an amazing JavaScript library that makes it easy to create wonderful web effects in just a few lines of code. As the website says:”

“jQuery is a JavaScript library that takes this motto to heart: Writing JavaScript code should be fun. jQuery achieves this goal by taking common, repetitive, tasks, stripping out all the unnecessary markup, and leaving them short, smart and understandable.”

Maybe you are thinking… “Why I would need another JavaScript library”? Just give a try and you will see how simple and powerful it is even if you have already used Moo.fx, Scriptaculous, TW-SACK or Prototype.

Why I should use jQuery?
Simple. In just one glance at the source code of a page using jQuery you’ll see how easy it is to use, how much it accomplishes in so few lines of code, and how graceful it is.

My mind was opened one day when I stumbled across some code written with jQuery. I was flipping through the RSS feeds and reading my daily dose of web design blogs when I came across an example of JavaScript loveliness that used jQuery. Truth be told, the code on that site had some browser related bugs… but the concept was something I hadn’t seen before.

What about the code?
The code looked almost simple. Like nothing I had seen before. It made sense.

I started reading through the documentation and was amazed to see how much could be done with so little extra code.

When you can use jQuery?
You should use jQuery when you need:

A small library that gives you powerful control over the Document Object Model
With very little effort or work on your part
Or

Quick access to AJAX
Without a lot of bloat (overhead - wasted code)
And some basic animation effects to spice things up
But…

If you need super fancy effects for animation, drag and drop, and super smooth animation then you’ll probably want to use Prototype and one of the many great library created to enhance the effects.

Where to get it?
You can download the source code (15k), a lot of plugins and read some excellent tutorials at the JQuery website . jQuery was created by John Resig.

Happy Coding ,
Uday.Adidham

Labels: , , , , ,

C# Ternary Operator

Hi DotNetGems,
First we discuss about the If..Else . I think Every one know about If..else and Nested If Else statements so same like that we use the Ternary Operators.the symbole is like this "?:".

If..else example

using System;
class Program
{
static void Main(string[] args)
{
int age = 31;
if (age > 75)
Console.WriteLine("Have a nice retirement");
else
Console.WriteLine("You are still young");
Console.Read();
}
}

Now The Ternary Operator

The ternary operator looks like this: "?:"
Ternary operator has one condition expression and can return one of possible two values. Lets take a look at an example:

using System;

namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
int a = 1;
string b = (a < 2) ? "true" : "false";
Console.WriteLine(b);
Console.Read();
}
}
}



Happy coding
Uday.Adidham

Labels: , ,

Monday, January 5, 2009

Datagrid Examples

To place a DataGrid on an ASP.NET Web page you simply need to add the following code:




Here the id you choose will be the name of the DataGrid you'll use when referring to it in your server-side code. The syntax above gets us started using a DataGrid by placing it in the HTML content, but in order to have the DataGrid display anything useful we need to bind the DataGrid to some collection of information. This collection of information can be any object that supports the IEnumerable interface. This includes things like Arrays, collection classes (ArrayList, Hashtable, etc.), DataSets, DataReaders, and a number of other objects. Since we'd like to focus on displaying database information, for this article we'll focus on binding DataGrids to DataReaders, which are synonymous to forward-only, firehose cursors Recordsets in classic ADO/ASP. (For more information on reading database results into DataReaders using ADO.NET be sure to read:

For furuther information http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

Happy Coding
Uday.Adidham

Labels: , , ,

Thursday, January 1, 2009

Flex(Fx) For .Net Applications.

The Below two links for Adobe Flex Traing for .Net People.


"http://www.adobe.com/devnet/flex/videotraining/?sdid=EFMDI"


http://www.adobe.com/devnet/flex/flex_net.html


Happy Flex,
Uday.Adidham

Labels: , ,