Hi
Make windows communication foundation is one of the skill of your Skills set practising Code snippets @
1)WCF.netfx
2)dotnetslackers
some more i will be adding shortly......
Saturday, September 13, 2008
Friday, September 5, 2008
WCF Videos..Worth Watching
Hello All,
Nice videos on WCF can be found
1)@ http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2006/09/13/8875.aspx
2)And some more interesting videos at
Pluralsight
Nice videos on WCF can be found
1)@ http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2006/09/13/8875.aspx
2)And some more interesting videos at
Pluralsight
Saturday, August 9, 2008
Thursday, August 7, 2008
WCF ScreenCasts And about Creating ScreenCasts
1)Visual Studio 2008 screen cast #2 - WCF By Darryl Burling
View blog @ http://blogs.msdn.com/darrylburling/archive/2007/11/04/visual-studio-2008-screen-cast-2-wcf.aspx
2)WCF Introduction Screencast by Guy Burstein
3)More on How to create Screencasts and sharing it Anywhere
View blog @ http://blogs.msdn.com/darrylburling/archive/2007/11/04/visual-studio-2008-screen-cast-2-wcf.aspx
2)WCF Introduction Screencast by Guy Burstein
3)More on How to create Screencasts and sharing it Anywhere
Tuesday, August 5, 2008
Learn with Implementation ---The WCF Videos on Channel9
1)Web Programming with WCF
You need to Install Silverlight to view this video which is readily available on the
the site
VS2008 Training Kit: Web Programming with WCF
2)You can get the Latest Video alerts from Google in you mailbox setting your search term
at http://www.google.com/alerts?hl=en&gl=
Which is the easiest and efficient way of learning new technology
You need to Install Silverlight to view this video which is readily available on the
the site
VS2008 Training Kit: Web Programming with WCF
2)You can get the Latest Video alerts from Google in you mailbox setting your search term
at http://www.google.com/alerts?hl=en&gl=
Which is the easiest and efficient way of learning new technology
Tuesday, July 22, 2008
Some Common Obstacles While Implementing WCF
1)Error:Unknown directive ServiceHost in WCF service
Solution:
Reinstall the VS2008 for fixing the error .Confliction in version 2.0.0.0 of Windows Communication Foundation (pre-release) as well as version 3.0.0.0 (rtm)causes this error
2)Sending large amount of Data with WCF service
Solution:1)WCF Message Streaming
If InsufficientMemoryException is thrown when writing to the channel
then you need to stream both request and response data from client and server
respectively..
Some more problems and solutions yet to be added.Comments are welcome from the readers
Solution:
Reinstall the VS2008 for fixing the error .Confliction in version 2.0.0.0 of Windows Communication Foundation (pre-release) as well as version 3.0.0.0 (rtm)causes this error
2)Sending large amount of Data with WCF service
Solution:1)WCF Message Streaming
If InsufficientMemoryException is thrown when writing to the channel
then you need to stream both request and response data from client and server
respectively..
Some more problems and solutions yet to be added.Comments are welcome from the readers
Thursday, July 17, 2008
Exporting Data From Excel to SqlServer
Following are the ways to export data from excel to sql server
1)With SQLBulkCopy
create file info.xls and create table in respective database named ExcelData
Source code as follows
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data.Common;
public partial class ExportFromExcelToSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Connection String to Excel Workbook
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\excel\Info.xls;Extended Properties=Excel 8.0";
// Create Connection to Excel Workbook
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand("Select ID,Data FROM [Sheet1$]", connection);
connection.Open();
// Create DbDataReader to Data Worksheet
using (DbDataReader dr = command.ExecuteReader())
{
// SQL Server Connection String
string sqlConnectionString = "Data Source=ITCUBE-4M1HVRHY; Initial Catalog=ITC;User ID=cp;Password=cp;";
// Bulk Copy to SQL Server
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "dbo.ExcelData";
bulkCopy.WriteToServer(dr);
}
}
}
}
}
2)With DTS utility of SQL
1)With SQLBulkCopy
create file info.xls and create table in respective database named ExcelData
Source code as follows
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data.Common;
public partial class ExportFromExcelToSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Connection String to Excel Workbook
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\excel\Info.xls;Extended Properties=Excel 8.0";
// Create Connection to Excel Workbook
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand("Select ID,Data FROM [Sheet1$]", connection);
connection.Open();
// Create DbDataReader to Data Worksheet
using (DbDataReader dr = command.ExecuteReader())
{
// SQL Server Connection String
string sqlConnectionString = "Data Source=ITCUBE-4M1HVRHY; Initial Catalog=ITC;User ID=cp;Password=cp;";
// Bulk Copy to SQL Server
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "dbo.ExcelData";
bulkCopy.WriteToServer(dr);
}
}
}
}
}
2)With DTS utility of SQL
Friday, July 4, 2008
Catching Errors in Event Log in root folder
Hello All,
This function helps you write the errors to event.log
which can be called in the catch block of try and catch.
public void CatchError(Exception objErr)
{
//Exception objErr = Server.GetLastError().GetBaseException(); --This is
//to be used in application_error and Page_error events
string err = "Error Caught in try and catch block \n" +
"Error in: " + Request.Url.ToString() +
"\nError Message:" + objErr.Message.ToString() +
"\nStack Trace:" + objErr.StackTrace.ToString() ;
err = err + System.DateTime.Today.ToString() +" " + txtPhoneNumber.Text +"\n";
// EventLog.WriteEntry("SAWeb", err, EventLogEntryType.Error); This s //to be used while writing to event log
//Server.ClearError();
// additional actions...
// TextWriter tw = new StreamWriter("C:/Inetpub/wwwroot/SAWeb/logs/error.log",true);
TextWriter tw = new StreamWriter(Request.PhysicalApplicationPath.ToString() + "logs\\error.log", true);
// write a line of text to the file
tw.WriteLine(err);
// close the stream
tw.Close();
}
This function helps you write the errors to event.log
which can be called in the catch block of try and catch.
public void CatchError(Exception objErr)
{
//Exception objErr = Server.GetLastError().GetBaseException(); --This is
//to be used in application_error and Page_error events
string err = "Error Caught in try and catch block \n" +
"Error in: " + Request.Url.ToString() +
"\nError Message:" + objErr.Message.ToString() +
"\nStack Trace:" + objErr.StackTrace.ToString() ;
err = err + System.DateTime.Today.ToString() +" " + txtPhoneNumber.Text +"\n";
// EventLog.WriteEntry("SAWeb", err, EventLogEntryType.Error); This s //to be used while writing to event log
//Server.ClearError();
// additional actions...
// TextWriter tw = new StreamWriter("C:/Inetpub/wwwroot/SAWeb/logs/error.log",true);
TextWriter tw = new StreamWriter(Request.PhysicalApplicationPath.ToString() + "logs\\error.log", true);
// write a line of text to the file
tw.WriteLine(err);
// close the stream
tw.Close();
}
Friday, June 20, 2008
Helpful Tips...Online...
Folder Lock without any S/W
Here you go with an alternative way to lock folders without the use of any alternative software
Open Notepad and copy the below code and save as locker.bat. Don't forget to change your password in the code it's shown the place where to type your password.
Now double click on locker .bat
First time start it will create folder with Locker automatically for u. After creation of the Locker folder, place the contents u want to lock inside the Locker Folder and run locker.bat again. To release the lock again run locker.bat. It prompts to enter your password. On entering the correct password we can unlock the folder.
I hope this comes in handy J
**********************************************************
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
2)Share Folders and Files online
1)Scribd.com
2)esnips
Here you go with an alternative way to lock folders without the use of any alternative software
Open Notepad and copy the below code and save as locker.bat. Don't forget to change your password in the code it's shown the place where to type your password.
Now double click on locker .bat
First time start it will create folder with Locker automatically for u. After creation of the Locker folder, place the contents u want to lock inside the Locker Folder and run locker.bat again. To release the lock again run locker.bat. It prompts to enter your password. On entering the correct password we can unlock the folder.
I hope this comes in handy J
**********************************************************
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
2)Share Folders and Files online
1)Scribd.com
2)esnips
Saturday, June 14, 2008
All about new visual studio 2008
1)Debugging the .net framework code
2)XSD TOOL
3)Hosting Indiogo webservice
4)Visual studio 2008 blogs
ScottGu's Blog
2)XSD TOOL
3)Hosting Indiogo webservice
4)Visual studio 2008 blogs
ScottGu's Blog
Tuesday, June 10, 2008
Thursday, May 15, 2008
Frequently needed source Code for WebApplications
In this post I am going to enlist the sources for generalise asp.net web applications
1)Spellcheck for Web
Its a very easy way to integrate the spellchecker with less efforts
step I Download the required files
Extract and copy
webdir.wsf ,bin ,dic ,doc ,lib, src, web.config files and folders to root folder
step II Just include the js file spell.js
step III Call the function checkSpelling() on button click
2)Hidden control to get javascript variable value at server side
1)Spellcheck for Web
Its a very easy way to integrate the spellchecker with less efforts
step I Download the required files
Extract and copy
webdir.wsf ,bin ,dic ,doc ,lib, src, web.config files and folders to root folder
step II Just include the js file spell.js
step III Call the function checkSpelling() on button click
2)Hidden control to get javascript variable value at server side
Thursday, May 8, 2008
Hands-On articles by MVPs
1)Articles by Bilal Haider on aspalliance
2)Some Practicals using Ajax
3)Matt Bersett's excellent Articles
4)Learn In asynchronus Way
....Some more yet to be added
2)Some Practicals using Ajax
3)Matt Bersett's excellent Articles
4)Learn In asynchronus Way
....Some more yet to be added
Convering SQL resultset to XML file
Hello All,
Here's the simplest way to convert SQL result to XML output
-- declare an XML variable
DECLARE @x XML
SET @x = ' '
-- create another XML variable
DECLARE @t XML
SELECT @t = ( SELECT TOP 3 name FROM sys.tables FOR XML AUTO)
-- insert the second XML variable to the first one
SET @x.modify( '
insert sql:variable("@t")
as last into (/Root)[1] ' )
-- Let us check the results
SELECT @x
/*
*/
Here's the simplest way to convert SQL result to XML output
-- declare an XML variable
DECLARE @x XML
SET @x = '
-- create another XML variable
DECLARE @t XML
SELECT @t = ( SELECT TOP 3 name FROM sys.tables FOR XML AUTO)
-- insert the second XML variable to the first one
SET @x.modify( '
insert sql:variable("@t")
as last into (/Root)[1] ' )
-- Let us check the results
SELECT @x
/*
*/
Monday, May 5, 2008
Adding Attributes to Server Controls
Hi
If you dont find the required property of a partcular control like Linkbutton
Add the attributes to this control as follows
lnkButton.Attributes.Add("Target", "frame");
Basicaly when linkbutton is rendered at client side ,its in form of anchor control
so All server controls are have the attributes of corresponding html controls
in above case linkbutton have attributes of anchor control.
If you have additional comments on this .please post your most valuable comments
thanxs
If you dont find the required property of a partcular control like Linkbutton
Add the attributes to this control as follows
lnkButton.Attributes.Add("Target", "frame");
Basicaly when linkbutton is rendered at client side ,its in form of anchor control
so All server controls are have the attributes of corresponding html controls
in above case linkbutton have attributes of anchor control.
If you have additional comments on this .please post your most valuable comments
thanxs
Monday, April 28, 2008
Javascript Goodies ..Enjoy.....
Find the interesting collection of javascripts on these Web
1)http://www.dhtmlgoodies.com/
2)http://www.scriptsearch.com/JavaScript/Scripts/
3)http://www.rgagnon.com/howto.html
4)http://www.javascriptkit.com/script/script2/progressbar.shtml
5)http://jennifermadden.com/index.html
1)http://www.dhtmlgoodies.com/
2)http://www.scriptsearch.com/JavaScript/Scripts/
3)http://www.rgagnon.com/howto.html
4)http://www.javascriptkit.com/script/script2/progressbar.shtml
5)http://jennifermadden.com/index.html
Cool Tools Collection
Hi
Following are some good tools i come across
1)Debugging Visualizer
2)Regular Expression generator
3)Elegant tools by Denis
4)Free Refractoring tools
5)Documentation Tool
Stay tuned to the post. still i want to make a good collection of tools in this
Following are some good tools i come across
1)Debugging Visualizer
2)Regular Expression generator
3)Elegant tools by Denis
4)Free Refractoring tools
5)Documentation Tool
Stay tuned to the post. still i want to make a good collection of tools in this
Thursday, April 17, 2008
Friday, April 4, 2008
Friday, March 28, 2008
Tuesday, March 18, 2008
Technology Geeks
Useful computer Geeks
Geeks by hosam kamel -A must Read
Geeks by Ryan Ternier -A must Read
Some more geeks.. Yet to be Added
Auto email on commit in CVS
Geeks by hosam kamel -A must Read
Geeks by Ryan Ternier -A must Read
Some more geeks.. Yet to be Added
Thursday, March 13, 2008
Sunday, February 24, 2008
Cool Stuff for Developers
1)For code search
1)For Studies
http://www.google.com/codesearch?hl=en&q=show:ARc_vTOc7Oc:wZf222A4j8E&sa=N&ct=rdl&cs_p=http://examples.oreilly.de/english_examples/adonetckbk/AdoDotNetCookbookCS.zip&cs_f=AdoDotNetCookbookCS/Main/Chapter+01
2)For Real time webapplication
http://www.google.com/codesearch?hl=en&lr=&q=gridview&btnG=Search
2)To debug javascript code
Go to IE's View tab -->Script debugger
javascript code wil be opened in microsoft script debugger window
put breakpoints where u want to debug the javascript code
If its not available on your IE browser then you have to download it from
http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en
or
http://www.script-debugger.com/download/
To debug javascript with Visual studio2005
http://geekswithblogs.net/lazydeveloper/archive/2006/07/10/84552.aspx
1. Start your application from Visual Studio IDE.
2. Open "Script Explorer" from your menu bar (Debug->Windows->Script Explorer). "Script Explorer" window will open. If "Script Explorer" is not available in menu; follow this
a. Enable script debugging options in your browser (Tools->Options)
b. Change your Visual Studio IDE settings to "Web Development Settings" (Tools->Import and Export Settings)
c. Enabled your Visual Studio IDE Just-In-Time debugger for "Script" (Tools->Options Debugging-> Just-In-Time)
3. In your application navigate to the intended page OR refresh your current page.
4. All .js file attached to you page and embedded javascript will be seen in "Script Explorer".
5. Double click (in "Script Explorer") to open the script you wish to debug.
6. Script file will be open in main window of Visual Studio IDE.
7. Insert the break point where you wish to debug.
8. Start execution in your application and debug your script (as usual as your server side code).
4)To implement remote debugging in Visual Studio 2005
http://support.microsoft.com/kb/910448
.........Keep awaiting ......Still I have to add some more stuffs to this post
1)For Studies
http://www.google.com/codesearch?hl=en&q=show:ARc_vTOc7Oc:wZf222A4j8E&sa=N&ct=rdl&cs_p=http://examples.oreilly.de/english_examples/adonetckbk/AdoDotNetCookbookCS.zip&cs_f=AdoDotNetCookbookCS/Main/Chapter+01
2)For Real time webapplication
http://www.google.com/codesearch?hl=en&lr=&q=gridview&btnG=Search
2)To debug javascript code
Go to IE's View tab -->Script debugger
javascript code wil be opened in microsoft script debugger window
put breakpoints where u want to debug the javascript code
If its not available on your IE browser then you have to download it from
http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en
or
http://www.script-debugger.com/download/
To debug javascript with Visual studio2005
http://geekswithblogs.net/lazydeveloper/archive/2006/07/10/84552.aspx
1. Start your application from Visual Studio IDE.
2. Open "Script Explorer" from your menu bar (Debug->Windows->Script Explorer). "Script Explorer" window will open. If "Script Explorer" is not available in menu; follow this
a. Enable script debugging options in your browser (Tools->Options)
b. Change your Visual Studio IDE settings to "Web Development Settings" (Tools->Import and Export Settings)
c. Enabled your Visual Studio IDE Just-In-Time debugger for "Script" (Tools->Options Debugging-> Just-In-Time)
3. In your application navigate to the intended page OR refresh your current page.
4. All .js file attached to you page and embedded javascript will be seen in "Script Explorer".
5. Double click (in "Script Explorer") to open the script you wish to debug.
6. Script file will be open in main window of Visual Studio IDE.
7. Insert the break point where you wish to debug.
8. Start execution in your application and debug your script (as usual as your server side code).
4)To implement remote debugging in Visual Studio 2005
http://support.microsoft.com/kb/910448
.........Keep awaiting ......Still I have to add some more stuffs to this post
Monday, January 21, 2008
My Favourite Books
1)Visual Studio Tips and Tricks
2)The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks
3)Visual Studio .NET Tips and Tricks: Books: Minh T. Nguyen
4)How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively
5).NET Gotchas
6)The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks
2)The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks
3)Visual Studio .NET Tips and Tricks: Books: Minh T. Nguyen
4)How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively
5).NET Gotchas
6)The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks
Thursday, January 10, 2008
The Fundoooooooooo Blogs
1)http://weblogs.asp.net/scottgu/
2)http://weblogs.asp.net/fredriknormen/
3)http://www.nikhilk.net/
4)http://dotnetslackers.com/community/blogs/sonukapoor/
5)http://harishmvp.blogspot.com/
6)http://www.vikramlakhotia.com/HomePage.aspx
7)https://msmvps.com/blogs/luisabreu/default.aspx
8)http://msmvps.com/blogs/laflour/pages/net-tips-asp-net.aspx
9)MVP Blogs
10)http://disturbedbuddha.wordpress.com/
11)MSDN Blogs
12)http://blogs.interfacett.com/dan-wahlins-blog
13)http://weblogs.asp.net/dwahlin
14)http://www.mikesdotnetting.com
15)Encosia
16)Azamsharp blog
Still I have to do a lot of surfing for some interesting blogs
2)http://weblogs.asp.net/fredriknormen/
3)http://www.nikhilk.net/
4)http://dotnetslackers.com/community/blogs/sonukapoor/
5)http://harishmvp.blogspot.com/
6)http://www.vikramlakhotia.com/HomePage.aspx
7)https://msmvps.com/blogs/luisabreu/default.aspx
8)http://msmvps.com/blogs/laflour/pages/net-tips-asp-net.aspx
9)MVP Blogs
10)http://disturbedbuddha.wordpress.com/
11)MSDN Blogs
12)http://blogs.interfacett.com/dan-wahlins-blog
13)http://weblogs.asp.net/dwahlin
14)http://www.mikesdotnetting.com
15)Encosia
16)Azamsharp blog
Still I have to do a lot of surfing for some interesting blogs
Subscribe to:
Posts (Atom)
Talk to Me
Email Subscriptions
Time is Money
My Random Musings
Powered by Stuff-a-Blog
About Me
- Swati Jain
- गम मनाने के लिए वक्त नहीं, ladhai के लिए bhi वक्त नही वक्त हैं तो सिर्फ इक saphal कोशिश मैं जुट जाने के लिए isme शक की गुंजाईश ही नही, पूरा ऐतबार हैं सफलता यही हैं ..यही हैं.. यही कही हैं जिसे पाने मैं सिर्फ चंद लम्हों की दुरी हें -- स्वाति जैन Software Developer MCTS Sharepoint 2010(70-573) Pune India