Wednesday, October 29, 2008

SQL Doc™

Document SQL Server 2000, 2005 and 2008 databases without any hassle.

  • Fast, simple database documentation
  • Document one or multiple databases, down to object level
  • Write, edit, and export documentation in easy-to-read HTML files or .chm files for team distribution
  • Includes all cross-database dependencies
download trial version :
http://www.red-gate.com/supportcenter/Product.aspx?p=SQL%20Doc

Saturday, October 25, 2008

How to identify your SQL Server 2005 version and edition

To determine which version of Microsoft SQL Server 2005 is running, connect to SQL Server 2005 by using SQL Server Management Studio, and then run the following Transact-SQL statement:

SELECT
SERVERPROPERTY('productversion') as productversion,
SERVERPROPERTY ('productlevel') as productlevel,
SERVERPROPERTY ('edition') as edition

The results are:

* The product version (for example, "9.00.1399.06").
* The product level (for example, "RTM").
* The edition (for example, "Enterprise Edition").

sample results :

9.00.1399.06 RTM DeveloperEdition

Monday, October 20, 2008

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

One of strange error that i had to deal with is the one mentioned above. The error used to prompt more frequently when the number of records increased in table. So at the initial stage of developments you won't have this timeout error. But when the system is in operation level and when the production data increases you may haev to come across this timeout error.

There are two main Timeout property in ADO.NET.

1. Connection Timeout for Connection
2. Timeout for Data Access( Command Object or DataAdapter)

Setting Connection Timeout property for SQLConnnection object ?

You can't set timeout property in connection object because its a READ ONLY property.

The proper way to do this is to set the timeout value in connection string as mentioned below.

SqlConnection conn = new SqlConnection("server=Server;uid=sa;pwd=123456;database=myDB;Connection Timeout=120");

Setting the timeout property in DataAdapter or CommandObject.

SqlDataAdapter sqlAdapter = new SqlDataAdapter();
sqlAdapter.SelectCommand = new SqlCommand(sqlQuery, conn);
sqlAdapter.SelectCommand.CommandTimeout = 0;


Setting the timeout value to 0 will makes adapter or command to wait for indefinite time before terminating the attempt to execute a command and generating an error.
The default timeout value for connection object is 15 seconds.

hope this might help you to solve the problem.


Thursday, August 21, 2008

Working with System Tables in SQL 2005

Find ALL tables that have columns with an identity property

SQL SERVER 2000:

select object_name(id),name from syscolumns where columnproperty(id,name,'IsIdentity')=1 

SQLSERVER 2005:

select object_name(object_id),name from sys.identity_columns 

Note: SQL Server 2005 stores the last value of the identity property that was generated. To query the last value execute the following query.

select name,last_value from sys.identity_columns

Find ALL columns in a table that are computed columns

SQL SERVER 2000:

select name from syscolumns where id =object_id('TableName') and iscomputed=1

SQL SERVER 2005:

select name from sys.computed_columns where object_id =object_id('TableName')

Note: The computed column in SQL Server 2005 may be persisted. To narrow down the result set, you could execute the following query:

select * from sys.computed_columns where is_persisted=0

Find ALL database names in a SQL Server instance

SQL SERVER 2000:

select name from master..sysdatabases

SQL SERVER 2005:

select name from sys.databases

Note: Many enhancements were made to the database. Query all of the columns in sys.databases to understand the new enhancements like snapshot, etc.

Find ALL Procedures in a Database

SQL SERVER 2000:

select name from sysobjects where type='P'

SQL SERVER 2005:

select name from sys.procedures

Note: You can find whether the stored procedure execution is used in replication or if the stored procedure is a startup procedure. Execute the following queries:

select name from sys.procedures where is_execution_replicated=1
select name from sys.procedures where is_auto_executed=0

Find ALL tables in a Database

SQL SERVER 2000:

select name from sysobjects where type='U'

SQL SERVER 2005:

select name from sys.tables

Note: In SQL Server 2005, you can find whether a table is replicated. Execute the following query.

select * from sys.tables  where is_replicated =1

Find ALL views in a Database

SQL SERVER 2000:

select name from sysobjects where type='V'

SQL SERVER 2005:

select name from sys.views

Note: In SQL Server 2005, you can find whether a view is replicated. Execute the following query.

select * from sys.views where is_replicated =1

Find ALL Triggers in a Database

SQL SERVER 2000:

select name from sysobjects where type='TR'

SQL SERVER 2005:

select name from sys.triggers where parent_class=1

Note: In SQL Server 2005, the triggers can be Assembly trigger (CLR) or a SQL trigger. In addition, we can find whether the trigger is an AFTER trigger or INSTEAD of trigger. Execute the following query:

select name from sys.triggers where type='TA'
select name from sys.triggers where type='TR'
select name from sys.triggers where is_instead_of_trigger=1

Find ALL SQL logins in a server

SQL SERVER 2000:

select * from master..syslogins where isntgroup=0 and isntname=0

SQL SERVER 2005:

select * from sys.sql_logins

Find ALL dependencies of the SQL Object in a Database

SQL SERVER 2000:

select * from sysdepends

SQL SERVER 2005:

select * from sys.sql_dependencies

Find ALL data types in SQL server

SQL SERVER 2000:

select * from systypes

SQL SERVER 2005:

select * from sys.systypes

Find ALL error messages in SQL server

SQL SERVER 2000:

select * from master..sysmessages

SQL SERVER 2005:

select * from sys.messages

Find ALL the database files of the current database

SQL SERVER 2000:

select name,filename from sysfiles

SQL SERVER 2005:

select name, physical_name from sys.database_files

Find the type of index

SQL SERVER 2000: We have to use indid column to determine the type of index from 0,1 or 255.

SQL SERVER 2005:

select object_name(object_id),name, type_desc  from sys.indexes where type_desc ='CLUSTERED'
select object_name(object_id),name, type_desc from sys.indexes where type_desc ='HEAP'
select object_name(object_id),name, type_desc from sys.indexes where type_desc ='NONCLUSTERED'
select object_name(object_id),name, type_desc from sys.indexes where type_desc ='XML'

Thursday, April 10, 2008

Google Jumps Head First Into Web Services With Google App Engine

Google App Engine is designed for developers who want to run their entire application stack, soup to nuts, on Google resources. Amazon, by contrast, offers more of an a la carte offering with which developers can pick and choose what resources they want to use.

Google Product Manager Tom Stocky described the new service to me in an interview today. Developers simply upload their Python code to Google, launch the application, and can monitor usage and other metrics via a multi-platform desktop application.

More details from Google:

Today we’re announcing a preview release of Google App Engine, an application-hosting tool that developers can use to build scalable web apps on top of Google’s infrastructure. The goal is to make it easier for web developers to build and scale applications, instead of focusing on system administration and maintenance.

Leveraging Google App Engine, developers can:

  • Write code once and deploy. Provisioning and configuring multiple machines for web serving and data storage can be expensive and time consuming. Google App Engine makes it easier to deploy web applications by dynamically providing computing resources as they are needed. Developers write the code, and Google App Engine takes care of the rest.
  • Absorb spikes in traffic. When a web app surges in popularity, the sudden increase in traffic can be overwhelming for applications of all sizes, from startups to large companies that find themselves rearchitecting their databases and entire systems several times a year. With automatic replication and load balancing, Google App Engine makes it easier to scale from one user to one million by taking advantage of Bigtable and other components of Google’s scalable infrastructure.
  • Easily integrate with other Google services. It’s unnecessary and inefficient for developers to write components like authentication and e-mail from scratch for each new application. Developers using Google App Engine can make use of built-in components and Google’s broader library of APIs that provide plug-and-play functionality for simple but important features.

Google App Engine: The Limitations

The service is launching in beta and has a number of limitations.

First, only the first 10,000 developers to sign up for the beta will be allowed to deploy applications.

The service is completely free during the beta period, but there are ceilings on usage. Applications cannot use more than 500 MB of total storage, 200 million megacycles/day CPU time, and 10 GB bandwidth (both ways) per day. We’re told this equates to about 5M pageviews/mo for the typical web app. After the beta period, those ceilings will be removed, but developers will need to pay for any overage. Google has not yet set pricing for the service.

One current limitation is a requirement that applications be written in Python, a popular scripting language for building modern web apps (Ruby and PHP are among others widely used). Google says that Python is just the first supported language, and that the entire infrastructure is designed to be language neutral. Google’s initial focus on Python makes sense because they use Python internally as their scripting language (and they hired Python creator Guido van Rossum in 2005).

Source

Monday, January 14, 2008

Microsoft Silverlight

Microsoft Silverlight is the next generation, cross browser web client, cross platform runtime. Silverlight is a lightweight subset of XAML for building rich media experiences on the web.

http://www.microsoft.com/silverlight/

Visual Studio 2008

you can download the VS 2005 and SQL Server 2008 Express Edition from here :

http://www.microsoft.com/express/download/#webInstall

Tuesday, November 20, 2007

Open Source Web Design

download free web design templates and share yours with others:

http://www.oswd.org/


Wednesday, September 05, 2007

10 tech skills you should develop during the next five years

If you want a job where you can train in a particular skill set and then never have to learn anything new, IT isn't the field for you. But if you like to be constantly learning new things and developing new skills, you're in the right business. In the late 80s, NetWare and IPX/SPX administration were the skills to have. Today, it's all about TCP/IP and the Internet.

Let's take a look at some of the skills you should be thinking about developing to keep on top of things in the tech world in the next five years.

#1: Voice over IP

Many companies and consumers are already using VoIP for telephone services due to cost and convenience factors. According to a SearchVoIP.com article in June 2007, sales of pure IP PBX systems for the first quarter of 2007 increased 76% over the first quarter of the previous year.

More and more companies are expected to go to VoIP, to either supplement or replace their traditional phone lines. And because VoIP runs on the TCP/IP network, IT administrators will in many cases be expected to take responsibility for VoIP implementation and ongoing administration.

#2: Unified communications

Along with the growing popularity of VoIP, the concept of unified communications -- the convergence of different communications technologies, such as e-mail, voicemail, text messaging, and fax -- looks to be the wave of the future. Users will expect to have access to all their communications from a single interface, such as their Inbox, and from a variety of devices: PCs, laptops, smart phones/PDAs, traditional phones, etc.

Convergence makes networks more complex, and IT administrators will need to develop skills for managing converged networks to compete in tomorrow's job market.

#3: Hybrid networks

The day of the all-Windows or all-UNIX network is already past, and networks are likely to grow more, rather than less hybridised in the future. As new versions of Linux, such as Ubuntu, become friendlier for end users, we're likely to see some organisations deploying it on the desktop for certain users. However, it's likely that other users will continue to use Windows because of application requirements and/or personal preferences, and there may very well be Macintosh users in the mix as well, especially in graphics environments.

IT pros will no longer be able to get by with expertise in only one platform; you'll need to be able to support and troubleshoot different operating systems.

#4: Wireless technology

Wireless networking is still in its infancy in the enterprise. Companies are (often grudgingly) establishing wireless LANs for the use of employees and visitors because it's the most convenient way for portable computers to connect to the network, but many organisations are still wary of wireless (rightly so), particularly its security implications.

But wireless isn't going away, and the future promises faster and more secure wireless technologies. You'll need to know about 802.11n, a new standard now in development and estimated to be released in late 2008, which will provide for a typical throughput of 74 Mbps with a theoretical maximum data rate of 248 Mbps and a longer range than current 802.11a/b/g standards (about 70 meters, or approximately 230 feet).

#5: Remote user support

The trend is toward more employees working off-site: executives taking their laptops on the road, telecommuters working from home at least a few days per week, personnel in the field connecting back to the LAN, and so forth. The IT staff will need to be able to support these remote users while maintaining the security of the internal network.

It will be important to learn skills relating to different VPN technologies (including SSL VPN) and technologies for health monitoring and quarantining of remote clients to prevent those that don't meet minimal criteria (antivirus installed and updated, firewall enabled, etc.) from connecting to the LAN and putting the rest of the network at risk.

#6: Mobile user support

Cell phones, Blackberries, and other ultra-portable devices are becoming ubiquitous and will likely grow more sophisticated in the future. Employees will expect to get their corporate e-mail on their phones and in some cases (such as Windows Mobile devices), to use terminal services client software to connect these small devices to the company LAN.

IT staff members will need to develop a plethora of skills to support mobile users, including expertise in configuration of mail servers and knowledge of security implications of the devices.

#7: Software as a service

Web 2.0, the next generation of the Internet, is all about SaaS, or Software as a Service. SaaS involves delivering applications over the Web, rather than installing those applications on individual users' machines. Some IT pundits have warned that SaaS will do away with IT administrators' jobs entirely, but the more likely scenario is that the job description will change to one with less focus on deployment and maintenance of applications and more emphasis on broader-based planning, convergence, etc.

If SaaS takes off, the job market may also shift so that more jobs are concentrated in the application provider sector rather than in companies' in-house IT departments. In that situation, IT pros who have the skills relating to service provision and multi-tenant architecture will have a head start when it comes to getting and staying employed.

#8: Virtualisation

Virtualisation has been around for a while, but now, with Microsoft heavily investing in the technology with its Windows hypervisor (Viridian), which will run on Windows Server 2008, VMWare offering VMWare Server for free, and Red Hat and SuSE planning to include Xen hypervisor technology in the next versions of their server products, we can expect the concept of virtual machines to go to a whole new level in the next few years.

Managing a VM-based network environment is a skill that will be not just handy, but essential, as more and more companies look to virtualisation to consolidate servers and save on hardware costs.

#9: IPv6

Widespread adoption of the next generation of the Internet Protocol (IPv6) hasn't come about as quickly as originally predicted, in large part because technologies such as NAT prevented the depletion of available IP addresses from happening as soon as anticipated.

However, with the number of hosts on the Internet growing steadily, the larger address space will eventually be critical to further expansion. IPv6 also offers better security with IPsec, a part of the basic protocol suite. Perhaps the inevitability of the transition is best indicated by the fact that Windows Vista, Windows Server 2008, Mac OS X 10.3, and the latest versions of other operating systems have IPv6 enabled by default.

With an entirely different address notation, called CIDR, and addresses written in hexadecimal instead of the familiar four octets of decimal numbers used by IPv4, there will be a learning curve for IT administrators. The time to tune up your IPv6 skills is now, before the transition becomes mandatory.

#10: Security

Smart IT pros have been developing their security skills for the last several years, but the future will bring new security challenges and new security mechanisms. Technologies such as VoIP and mobile computing bring new security issues and challenges. Authentication methods are evolving from a password-based model to multifactor models, and biometrics are likely to become more important in the future.

As threats become more sophisticated, shifting from teenage hackers defacing Web sites "just for fun" to well financed corporate espionage agents and cyberterrorists bent on bringing down the country's vital infrastructure by attacking the networks that run it, security skills must keep up.

In addition to proactive measures, IT pros will need to know more about computer forensics and be able to track what is happening and has happened on their networks.

Monday, August 06, 2007

Microsoft Visual Studio 2008


The next version of Visual Studio, Microsoft® Visual Studio® 2008, will provide an industry-leading developer experience for Windows Vista, the 2007 Microsoft Office system, and the Web. In addition, it will continue in the Microsoft tradition of development language innovation.

Wednesday, May 30, 2007

Adobe's ColdFusion warms to .Net

San Francisco (InfoWorld) - Adobe's ColdFusion software for building Internet applications and Web sites is being improved with Microsoft .Net support, enabling .Net objects to be invoked from within the ColdFusion language.

A public beta of ColdFusion 8, accessible here, is to be offered on Wednesday. The general release is set for mid-year. Version 8 is the first Adobe-branded release of the former Macromedia technology.

ColdFusion is a server-side Java application; it is partnered with a markup language for writing ColdFusion applications. .Net support in the upcoming version 8 bridges the Java and Microsoft worlds.

"Customers don't need to select one technology to the exclusion of the other," Tim Buntel, Adobe senior product marketing manager, said.

Also featured in ColdFusion 8 is generation of PDF documents as well as capabilities for working with PDF forms and manipulating existing PDF documents. Support for the JBoss application server has been added, also.

For developers, Adobe is adding interactive debugging based on the Eclipse IDE. A Server Monitor capability, meanwhile, identifies bottlenecks in the server.

Adobe's Flex rich Internet application technology and AJAX (Asynchronous JavaScript and XML) components are leveraged in the new product for integration of complex environments with intuitive interfaces, Adobe said.

ColdFusion differs from Flex in that Flex is a client-side technology featuring a language and compiler to convert code to Flash content. With ColdFusion, the server-side technology can integrate with databases and Java and .Net objects while also offering text searching. However, ColdFusion also can generate an HTML interface for Web applications.

The ColdFusion upgrade puts to rest questions about Adobe's commitment to the technology after acquiring Macromedia, said analyst Ray Valdes, research director for Internet platforms and Web services at Gartner.

"People may have wondered if Adobe appreciated ColdFusion, and I think they do. I think it's part of their enterprise software strategy," Valdes said.

While Adobe recently offered the Flex software development kit to the community at large via open source, there are no plans to open-source ColdFusion. This stance gives the company the ability to make certain ColdFusion integrates with other Adobe technologies, Buntel said.

Yahoo News

Friday, March 09, 2007

"Server Error in '/application name' Application"

You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application.

You may receive the following error message while browsing an asp.net application.


"Server Error in '/application name' Application
------------------------------------------------

Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

This error might occur due to two scenarios.

1. There is an error in the application's logic with the inputformat, Type etc., and you have set the Custom Error Mode in the web.config to "On" and not specified a default redirect error page.

2. The web.config file is not well formed or having invalid characters and the application is not able to pick up the settings from the same.

Solution

1. Set the custom error mode to "Off" to view the error.
After rectifying it and before deployment, change it to "On" and specify a default error page, as follows:-






such that your users will not be able to see the actual error and get your friendly error page where you can politely say "An error has occured! Contact the Application Help Support ..." .

2. If the above solution is not working (i.e. even after setting the custom error mode to On, the same "Server Error" occurs, then the likely chance is that your web.config file is not well formed and has invalid characters etc.,

To resolve, it copy paste the contents of the file to a notepad, save it as an xml file and try to browse the xml file in the browser. If the xml file is unable to be rendered by the browser and throws error, then you can find the place where the tags are not well formed or invalid character(s) exist and rectify them.

Things worth noting is Web.config is case sensitive (off, oFF,..etc) and even trailing/leading spaces can cause the above error.

you will encounter the same problem at the time of hosting a website to a remote webserver. Eventhough once you have change the web.conf you will get that above message.

solution is to check whether is to make sure that you have given appropriate/suitable permission to the folders like App_Data & to double check the .NET version.

hope all you guys can learn something about the above problem.

:-)

Monday, February 19, 2007

Visual Studio Add-Ins Every Developer Should Download Now

Tools for unit testing
Tools for code and documentation management and generation
Tools for modifying the development environment
Tools for working with data


More Details

Saturday, February 10, 2007

POS for .NET and OPOS

OPOS is an existing implementation of UPOS for Microsoft Windows, based on Component Object Model (COM) technology. POS for .NET constitutes an improved, next-generation implementation of UPOS for Microsoft Windows, based on .NET. In comparison to OPOS, POS for .NET increases productivity of developers of both POS applications and service objects, by providing all the benefits of .NET managed code while at the same time exposing a set of easy to use interfaces and base classes.

POS for .NET is backward-compatible with OPOS version 1.8 service objects. In other words, applications using POS for .NET can simultaneously interact with .NET service objects written for POS for .NET and OPOS service objects.

POS for .NET Device Basic Classes

Each hardware device in POS for .NET is represented by both an abstract interface, such as CashDrawer class, and a “basic” class, such as CashDrawerBasic. Basic classes derive from the underlying interface and contain basic functional support for the device. POS for .NET provides generic support for opening, claiming, and enabling the device; device statistics; and management of delivery of events to the application. In addition, each basic class contains a set of inherited and protected methods that can be implemented by the service object. This topic provides summary information about basic classes that can be used by service objects that wish to derive from the device’s basic class, rather than taking advantage of the more fully implemented device base class

http://msdn2.microsoft.com/en-us/library/ms827970.aspx

Tuesday, February 06, 2007

New ConfigurationManager in VS 2005

Using .NET Framework 1.1 i have used following code to pull a encrypted connection string from the app.conf file, I used....
System.Configuration.ConfigurationSettings.AppSettings["connstr"].ToString();


And the compiler gave me the following error.
Warning 1 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by ConfigurationManager.AppSettings'

So I try and change my Code to the following ...
System.Configuration.ConfigurationManager.AppSettings["connstr"].ToString();

and I get a compiler error, saying the compiler can't find ConfigurationManager.

Well here's the confusion.... The Original System.Configuration.ConfigurationSettings class is found in the System.dll assembly. There is a new assembly with all the new ConfigurationManager classes as System.Configuration.dll. Before using the ConfigurationManager class, you must first set a reference to the new System.Configuration.dll.


Add a reference to System.Configuration by clicking Project -> Add Reference... and searching through the .NET components for System.Configuration

Friday, February 02, 2007

Mobiles to get portable hard drives

The first portable hard drives for phones are coming onto the market, promising a "multimedia revolution".

Seagate launched its Digital Audio Video Experience (Dave) range of mobile hard drives on 30th Jan 2007, which consist of a 1cm thick credit card sized unit storing 10GB to 20GB of storage and communicating with phones via Bluetooth.

The devices have a range of around 30ft and battery life of 14 days standby or 10 hours use. No pricing details have yet been released.

"Mobile telephony is undergoing a multimedia revolution, and the Dave mobile content platform will provide even more fuel for the growth of new music and video services over mobile networks," said Patrick King, senior vice president and general manager of Seagate's consumer electronics business unit.

"Products using Dave will enable digital content for business or entertainment to be stored, moved and connected in ways never before possible."

But Seagate has been beaten to the punch on the technology by Agere Systems with a similar device, the BlueOnyx, that can communicate via Bluetooth or Wi-Fi and can store up to 40GB.
Models are also available with USB and SD card ports, and costs range from £50 to £130.
"We wanted to create a highly mobile device that solves a lot of the connectivity issues consumers have while giving them all the storage they want at an affordable price," said Ruediger Stroh, general manager of Agere's storage division.

"The capability will finally make the PC just another consumer device instead of the centre of the digital universe."

Source: vnunet

ADO.NET Connection Strings

ODBC Driver for Excel

strConnection = _T("Driver={Microsoft Excel Driver (*.xls)};DriverId=790;" bq=C:\\DatabasePath\\DBSpreadSheet.xls;

DefaultDir=c:\\databasepath;");

ODBC Driver for Text
strConnection = _T("Driver={Microsoft Text Driver (*.txt; *.csv)};" "Dbq=C:\\DatabasePath\\;Extensions=asc,csv,tab,txt;");

Refer Connectionstrings

Wednesday, January 24, 2007

Articles

Interesting articles:

JavaScript with ASP.NET 2.0 Pages - Part 1
dotnetslackers.com

DATA POINTS
Revisiting System.Transactions
MSDN Article

SENDING EMAIL USING ASP.NET 2.0

Just thought to share my code which i used to implement a simple Mail System. Hope this might help you!

Imports System.Net.Mail

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendEmail.Click
Dim Msg As MailMessage = New MailMessage()
Dim MailObj As New SmtpClient
Try
Msg.From = New MailAddress(UsersEmail.Text, "Andy")
Msg.To.Add(New MailAddress("ammarfassy@gmail.com", "Author"))
MailObj.Host = "192.168.16.70"
MailObj.Port = 25
Msg.IsBodyHtml = "False"
Msg.Body = Body.Text
Msg.Subject = Subject.Text
MailObj.Send(Msg)
Label1.Text = "Email Sent!"
Catch ex As Exception
Label1.Text = ex.Message
End Try
End Sub

Add your IP Address (local) in your SMTP server & under the properies add the same IP address to Relay Restrictions (Grant & deny permissions to relay email through this SMTP virutal server).

The sent email will be a spam email!

extra notes on this:

under web.config under















namespace System.Net.Mail;

string UserName = System.Configuration.ConfigurationManager.AppSettings["smtpUsername"];
string Password = System.Configuration.ConfigurationManager.AppSettings["smtpPassword"];
string Host = System.Configuration.ConfigurationManager.AppSettings["smtpServer"]; string sFrom = "me@doman.com";
string sTo;
string sSubject = "sample subject";
string sBody = "sample html body";

string toAddress = "myaddress@someotherdomin.com,myaddress2@someotherdomin.com";
string msgSubject = sSubject;
string msgBody = sBody;

SmtpClient client = new SmtpClient(Host);
MailAddress from = new MailAddress(sFrom);
MailAddress to = new MailAddress(toAddress);
MailMessage message = new MailMessage(from, to);
message.Priority = MailPriority.High;
message.IsBodyHtml = true;

System.Net.NetworkCredential NTLMAuthentication = new System.Net.NetworkCredential(UserName, Password);
message.Subject = msgSubject;
message.Body = msgBody;
client.UseDefaultCredentials = false;
client.Credentials = NTLMAuthentication;
client.Send(message);

Friday, January 05, 2007

.NET Framework 3.0 is released!

The .NET Framework 3.0 has officially been released! You can download the .NET Framework 3.0 components here:

.NET Framework 3.0 Runtime Components
Windows SDK for Vista and the .NET Framework 3.0
Visual Studio 2005 Extensions for .NET Framework 3.0 (Windows Workflow Foundation)
Visual Studio 2005 Extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP

Note, if you are using Windows Vista the .NET Framework 3.0 Runtime Components are installed by default.