learned/learning/to learn RSS 2.0
# Wednesday, April 21, 2010
Recently, when I tried to copy a large file (around 1 GB) to Virtual Machine (VM) from the host machine, it froze either of the machines. However, when I tried to copy a large file from the VM to the host machine, everything was normal.

Found a solution for this problem:
Try allocating your Virtual Hard Disk's space upfront. Unfortunately, I didn't find a way to modify my existing virtual hard disk, so I added a new virtual drive and pre-allocated its space, and it resolved the file transfer problem.

Wednesday, April 21, 2010 8:34:47 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
# Sunday, April 4, 2010
If you are setting up a FTP Server in a Domain, this article should help you. I have just taken info from various sites and had consolidated into one.

Installation -
Click here to view the entire article
  1. Click Start, point to Control Panel, and then click Add or Remove Programs.
  2. Click Add/Remove Windows Components.
  3. In the Components list, click Application Server, click Internet Information Services (IIS) (but do not select or clear the check box), and then click Details.
  4. Click to select the following check boxes (if they are not already selected):
    Common Files
    File Transfer Protocol (FTP) Service
    Internet Information Services Manager
  5. Click to select the check boxes next to any other IIS-related service or subcomponent that you want to install, and then click OK.
  6. Click Next.
  7. When you are prompted, insert the Windows Server 2003 CD-ROM into the computer's CD-ROM or DVD-ROM drive or provide a path to the location of the files, and then clickOK.
  8. Click Finish.
  1. Start Internet Information Services Manager or open the IIS snap-in.
  2. Expand Server_name, where Server_name is the name of the server.
  3. Expand FTP Sites
  4. Right-click Default FTP Site, and then click Properties.
  5. Click the Security Accounts tab.
  6. Click to select the Allow Anonymous Connections check box (if it is not already selected), and then click to select the Allow only anonymous connections check box.
    When you click to select the Allow only anonymous connections check box, you configure the FTP Service to allow only anonymous connections. Users cannot log on by using user names and passwords.
  7. Click the Home Directory tab.
  8. Click to select the Read and Log visits check boxes (if they are not already selected), and then click to clear the Write check box (if it is not already cleared).
  9. Click OK.
To Isolate the Users - Click here to view the entire article
To create a new FTP site that isolates users
1. In IIS Manager, expand the local computer, right-click the FTP Sites folder, point to New, and click FTP Site. 
2. Provide the required information in the FTP Site Description and IP Address and Port Settings dialog boxes, and click Next. 
3. In the FTP User Isolation dialog box, click Isolate users, and click Next. 
4. In the Path box, type or browse to the directory that contains, or will contain, the site content, and then click Next.
5. Select the check boxes for the FTP site access permissions you want to assign to your users, and then click Next. 
6. Click Finish.

To create FTP root-point and user folders
If users of different domains log on with their explicit domain\username credentials, create a subdirectory for each domain (by using the name of the domain) under the FTP site root directory you specified when you creating the FTP site.
For Example -
Domain Name: Account
FTP root directory -> D:\MyFTP\
LocalUser locate at D:\MyFTP\Account
For individual domain user, you need to create folder in this format - Domain\username
Domain User: Nancy locate at D:\MyFTP\Account\Nancy

How To Configure PassivePortRange In IIS - Click here to view the entire article. Folders will be listed only if passiveportrange is configured.
a) To Enable Direct Metabase Edit
1. Open the IIS Microsoft Management Console (MMC).
2. Right-click on the Local Computer node.
3. Select Properties.
4. Make sure the Enable Direct Metabase Edit checkbox is checked.
b) Configure PassivePortRange via ADSUTIL script
1. Click Start, click Run, type cmd, and then click OK. 
2. Type cd Inetpub\AdminScripts and then press ENTER.
3. Type the following command from a command prompt.
    adsutil.vbs set /MSFTPSVC/PassivePortRange "5500-5700"       
4. Restart the FTP service (Start->Run->services.msc, find FTP Publishing Service and Restart it).

Note: this is what I executed in my machine - cscript.exe
adsutil.vbs set /MSFTPSVC/PassivePortRange "5500-5700"
You'll see the following output, when you configure via ADSUTIL script:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

PassivePortRange                : (STRING) "5500-5700"

Open Ports in Windows Firewall
Default FTP port is 21, add this TCP port in Windows Firewall Exception list.

To Open/Delete multiple ports
open ports
for /L %i in (5000,1,5200) do netsh firewall add portopening TCP %i "FTP %i"

delete opened ports
FOR /L %I IN (5000,1,5200) DO netsh firewall delete portopening TCP %I

FTP Client
FreeCommander is a windows file manager which comes with FTP Client, I have been using this for quite some time...I'm satisfied!

Sunday, April 4, 2010 3:13:09 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
For Future Reference | Miscellaneous
# Saturday, April 3, 2010
Presumption: You know the other users' passwords.

1. Open VSS Explorer
2. Choose File > Open SourceSafe Database
3. Change the Username (the user who has checked out the files)
4. Once you change the Username, "Open" button will be enabled
5. Click Open and enter the user's credentials
6. Now you should be able checkin the files

Sometimes I do my development stuff in my laptop and sometimes in my desktop, and I share code using VSS...this approach had helped me many times as I know both the systems' credentials. I don't have any idea how to do this without knowing the other users' credentials.

Saturday, April 3, 2010 1:03:58 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
For Future Reference
# Saturday, January 23, 2010
Here I'm going to use MaxMind's GeoIP flat file

To create a new Integration Services package:

1.     Choose Start > All Programs > Microsoft SQL Server 2005 > SQL Server Business Intelligence Development Studio.
2.     On the File menu, choose New > Project to create a new Integration Services project.
3.     In the New Project dialog box, select Integration Services Project.
4.     In the Name box, change the default name to Importing Flat Text File.
5.     Click OK.

An empty package called Package.dtsx will be created and added to your project, you can rename this package as you want.

To add connections to the flat file and the database

1. Right-click anywhere in the Connection Managers area (bottom most window) and then click New Flat File Connection (for other type of connections like Excel, FTP etc., choose New Connection), it will open Flat File Conneciton Manager Editor.
2. On the Flat File Connection Manager Editor screen, enter connection manager name.
3. Click Browse.
4. In the Open dialog box, browse to the flat text file you intend to extract data from.
5. Set the fields according to your flat file. To preview the columns in the text file, click Columns tab. To rename the columns, click Advanced, and in the property pane change the "Name" property for each column.

6. To add connection to the database, right-click in the Connection Managers area and then click New OLE DB Connection.
7. On the Configure OLE DB Connection Manager screen, click New.
8. Choose your server (servers in your network will be listed) or enter IP.
9. Choose authentication type and the database.
10. Test the connection.

Your connection managers window will look something like this:

To add a Data Flow task:
1. Click the Control Flow tab.
2. Add a Data Flow Task from the toolbox (under Control Flow Items section) to the design surface of the control flow tab. Rename it as you want.

To add a Data Flow Source:
1. Click on the Data flow tab. 
2. Add a Flat File Source from the toolbox (under Data Flow Sources section) to the design surface of the data flow tab. Rename it as you want.
3. Double-click the Flat File source to open the Flat File Source Editor box.
4. In the Flat file connection manager dropdown, select the created flat file connection.
5. You can rename the output columns if you want.

To add a OLE DB destination:
1. Add a OLE DB Destination from the toolbox (under DataFlow Destinations). 
2. Drag the green arrow from the Flat file source to the OLE DB Destination.

Your data flow design surface will look something like this:

3. Double click OLE DB Destination to open OLE DB Destination Editor.
4. Select the created OLE DB connnection for OLE DB connection manager (it will be automatically selected).
5. Click New to create a new table or choose already created table.
6. Here, I have already created a table, so I'm just going to map the input columns with the table's columns.

My table structure:


To run this package:

1. Click on the Debug menu and click Start Debugging.
2. After the package has completed running, on the Debug menu click Stop Debugging.

Additional work:

If you see above, all the columns in my flat file are enclosed within double quotes, to strip them or to format the data.

To format the format columns in the flat file before importing:
1. Add a Derived Column from the toolbox (under Data Flow Transformations).
2. Connect Flat file source's output to Derived Column and Derived Column's output to OLE DB Destination.

3. Double click the Derived Column to open Derived Column Transformation Editor.
4. Expand Columns tree and drag the column to be formatted to Derived Column Name, and add you expression. Here, I'm removing double quotes.

To truncate data in the existing table before importing:

1. Click Control Flow tab.
2. Add Execute SQL Task from the toolbox (under Control Flow Items) to the design surface of control flow tab.
3. Double click it to open Execute SQL Task Editor, click the SQLStatement section ellipsis and add your SQL statement i.e., "Delete From TableName"

4. You can add it before or after the data flow task.
5. Add the connections appropriately.

Start running and the colors will change automatically:

There might be better ways to accomplish this, if so, please let me know.


Saturday, January 23, 2010 4:41:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
SQL Server
# Monday, December 21, 2009
I have seen people always getting confused with the loan calculation method, especially auto loan (including me, when I bought my first car), just to help you all ... I have created this calculator. Try this and find out how it differs from the other calculators on the internet. 

What my calculator is capable of?
1. Calculates monthly payment or apr or term or loan amount based on your input. (any calculator online does this ... not a big deal)
2. Gives you the total amount that a person will pay if he takes a loan i.e., principal (loan amount) + total interest amount. 
3. Gives you the amortization table i.e., monthly splits. The amount that goes towards your principal and interest from your monthly payment.
4. Allows you to edit your monthly payment and gives you the amount that you will gain with the change. Many pay their monthly payments exactly, without knowing that even few dollars (or rupees or whatever) increase will change their total interest.
5. Tells you whether refinance will be profitable or not, by changing interest rate or loan term. Gives you the amount that you will save/lose by refinancing. 

Formula used for this calculator:
Monthly Payment = (P * R) / (1 - (1 + R)^(-n)) where

P = Loan amount
n = loan term i.e., number of months 
R = Annual Percentage Rate/ (12 * 100)  
12:number of months/year 
100: As rates are in percentage

Feel free to send your comments.

Monday, December 21, 2009 1:02:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
# Wednesday, December 9, 2009
Can anybody find the difference between the first and the second ‘testing abc’ in this file test.txt (.02 KB). Open the file and search for ‘testing’ (there should be 2 matches), ‘abc’ (2 matches) and then ‘testing abc’ (1 match). It is because the ‘space’ between the two words varies, one is a regular space and the other is a html space (not nbsp), their ascii values are 32 and 160 respectively. I figured this after converting the spaces to ascii values! (spent almost an hour)

Wednesday, December 9, 2009 8:44:20 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Solutions
We can take an ASP.NET 2.0 application offline temporarily by uploading a file called app_offline.htm to the root directory.  It will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application.

To know more about this - http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

Working around the "IE Friendly Errors" feature - http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

I came to know this only today when I was listening to Hansel minutes, this will definitely help me in taking my website down easily.

Wednesday, December 9, 2009 8:36:59 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Solutions
This is for my future reference.

If you are using sitemap as the data source for the menu control, then you can set the property ShowStartingNode = "false" of sitemapdatasource.  Inorder to hide the arrow image, set the properties DynamicEnableDefaultPopOutImage = "False" and StaticEnableDefaultPopoutImage = "False" of the menu control.
Wednesday, December 9, 2009 4:28:18 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | For Future Reference | Solutions
Setting up shoutcast server is just like installing any other software.  Installation and configurations should not take you enough time, whereas opening your firewall/router ports might take some time, it depends on your networking knowledge. If you are aware of setting up a router or any other network device, this should not take you enough time.

Here you go:

1. Download Winamp. Install it.
2. Download DSP plug-in. Install it.
3. Download appropriate DNAS Shoutcast Server for your server and OS. Install GUI version.
4. Run DNAS server. This will open your GUI.

5. Start Winamp and open Preferences (CTRL-P) and click on the DSP/effects subcategory under the Plug-ins tree.
6. Select Nullsoft SHOUTCast Source DSP v x.x. This will open a pop-up like this

7. Play some song in winamp, this will change the dB on Input Meters (Main Tab).
8. Go to the 'Encoder' tab. Change the Encoder Type to MP3 Encoder, if you are playing mp3 song. This will automatically choose Encoder Settings to 24 Kbps, 22.050kHz, Mono. You can change this based on your needs.
9. Go to the 'Output' tab. Click the Connect button, this will start streaming the song current being played i.e., the status will change from 'Not Connected' and it will look like the window below. Click Yellowpages to add information about your radio.

10. If the status has changed, you can jump to step . If the status has not changed, check whether the shoutcast server has been added to your Windows Firewall exceptions list. Open your control panel, double-click windows firewall and go to Exceptions tab. Check whether 'sc_serv' is in the exception list, if not, click add program and add your shoutcast server exe (programfiles\shoutcast).

11. To check whether the shoutcast server is streaming properly, open windows media player. Go to File menu and click Open Url (ALT + F, U), and type http://localhost:8000. You should be able to listen to the song being played in winamp.
12. Open ports 8000 and 8001 in your windows firewall (see step 10 to know about opening firewall ports), and then open the same ports in your router (look for port forwarding in your router config page). This will allow you to stream your radio on the internet.
13. You can change the Shoutcast server's settings based on your needs (open DNAS GUI and click Edit Config). This site explains clearly about the settings - http://www.gentoo.org/doc/en/shoutcast-config.xml#doc_chap1

Fetching Shoutcast statistics from .NET application

WebClient webClient = new WebClient();
String xmlDoc;
DataSet shoutCastStatistics = new DataSet();

webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
xmlDoc= webClient.DownloadString("http://yourradiourlORwanip:8000/admin.cgi?pass=PASSWORD&mode=viewxml");
shoutCastStatistics.ReadXml(new StringReader(
xmlDoc), XmlReadMode.Auto);

Dataset shoutCastStatistics should have 5 tables: shoutcastserver, webdata, listeners, listener, songhistory and song. You can use them based on your needs.

Feel free to contact me if you have any questions.

Wednesday, December 9, 2009 4:08:22 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Miscellaneous
# Thursday, November 19, 2009

If we want to get control over finally rendered output of ASP.NET controls like Menu, TreeView, DataList etc, we can use CSS Control Adapter. This adapter emits CSS friendly html output and can significantly help when using CSS on the website. To know more about this adapter, follow this link - http://www.codeplex.com/cssfriendly. To see the difference between the html generated with and without using this adapter, follow this link - http://www.asp.net/CSSAdapters/Menu.aspx

Thursday, November 19, 2009 3:39:14 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
<April 2010>
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Sign In
Total Posts: 41
This Year: 0
This Month: 0
This Week: 0
Comments: 47
Pick a theme:
All Content © 2019, Gokulnath
DasBlog theme 'Business' created by Christoph De Baene (delarou)

The bulk of humans who will end up affairs Artya's expensive, bound assembly articles are small. These are mostly flush collectors who accept omega replica an aberrant yield on activity and are annihilation but amateur watch lovers. After a lifetime of affairs or seeing bourgeois timepieces, for abounding it can be abundantly auspicious to rolex replica don something weird, wild, or just apparent controversial. We feel that it is our role as a watch media destination not alone to acquaint with those alcove buyers who abide our breitling replica admired readership forth with anybody else, but aswell to bell ross replica accumulate humans abreast of what is new and potentially discussion-worthy in the archival world.