You can undelete files/folders in TFS if that is what you want?
In Visual Studio, go to Tools, Options, Source Control, Team Foundation Server and check the "Show deleted items in Source Control Explorer" box. Then browse in source control explorer to the place where the project was located and you can undeleted it.
To make it appear in your solution you could then do a "Get Specific" on the project in Source Control Explorer, then right click on the solution and do "Add Existing Project..." to load the project from your local file system into Source Control Explorer.
Hope that helps - good luck,
Wednesday, July 21, 2010
Turning off anonymous authenticaion in IIS
http://support.microsoft.com/kb/308160
How to configure IIS Web site authentication
Use an administrative account to log on to the Web server computer.
Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.
The Internet Information Services snap-in starts.
In the console tree, click * computer name where computer name is the name of the computer.
Right-click one of the following items, and then click Properties:
To configure authentication for all Web content that is hosted on the IIS server, right-click * computer name.
To configure authentication for an individual Web site, right-click the Web site that you want.
To configure authentication for a virtual directory or a physical directory in a Web site, click the Web site that you want, and then right-click the directory that you want, such as _vti_pvt.
To configure authentication for an individual page or file in a Web site, click the Web site that you want, click the folder that contains the file or the page that you want, and then right-click the file or the page that you want.
On the Item Name Properties dialog box where Item Name is the name of the item that you selected, click the Directory Security tab.
NOTE: If the selected item is an individual file, click the File Security tab.
Under Anonymous access and authentication control, click Edit.
Click to select the Anonymous access check box to turn on anonymous access. To turn off anonymous access, click to clear this check box.
NOTE: If you turn off anonymous access, you need to configure some form of authenticated access.
To change the account that is used for anonymous access to this resource, click Edit next to Account used for anonymous access.
In the Anonymous User Account dialog box, click the user account that you want to use for anonymous access.
Click to clear the Allow IIS to control password check box if you want to use the Windows LogonUser() API for user authentication.
NOTE: By turning this password control option off, this forces IIS to use normal authentication and to log the account on locally. You should turn this option off if users experience difficulty accessing resources such as files or Microsoft Access databases on a network computer.
Click OK.
Under Authenticated access, click to select the Basic authentication (password is sent in clear text) check box to turn on basic authentication. When you receive the following message, click Yes:
The authentication option you have selected results in passwords being transmitted over the network without data encryption. Someone attempting to compromise your system security could use a protocol analyzer to examine user passwords during the authentication process. For more detail on user authentication, consult the online help. This warning does not apply to HTTPS (or SSL) connections.
Are you sure you want to continue?
To select a domain with which to authenticate users that are using basic authentication, click Edit next to Select a default domain.
Type the domain that you want in the Domain Name box, and then click OK.
Note If you are concerned about security on your intranet because Basic Authentication transmits user name and password information in clear text, you can use Basic authentication together with Secure Sockets Layer (SSL).
Click to select the Digest authentication for Windows domain servers check box to use digest authentication. When you receive the following message, click Yes:
Digest authentication works with Windows 2000 domain accounts only and requires the accounts to store passwords as encrypted clear text.
Are you sure you wish to continue?
NOTE: You must configure user accounts with the Store password using reversible encryption account option turned on.
Click to select the Integrated Windows authentication check box to use integrated Windows authentication.
NOTE: This authentication method was formerly known as Microsoft Windows NT Challenge/Response or NT LAN Manager (NTLM).
Click OK, and then in the Item Name Properties dialog box, click OK. If the Inheritance Overrides dialog box opens:
Click Select All to apply the new authentication settings to all of the files or the folders that are within the item that you changed.
Click OK.
Quit Internet Information Services.
How to configure IIS Web site authentication
Use an administrative account to log on to the Web server computer.
Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.
The Internet Information Services snap-in starts.
In the console tree, click * computer name where computer name is the name of the computer.
Right-click one of the following items, and then click Properties:
To configure authentication for all Web content that is hosted on the IIS server, right-click * computer name.
To configure authentication for an individual Web site, right-click the Web site that you want.
To configure authentication for a virtual directory or a physical directory in a Web site, click the Web site that you want, and then right-click the directory that you want, such as _vti_pvt.
To configure authentication for an individual page or file in a Web site, click the Web site that you want, click the folder that contains the file or the page that you want, and then right-click the file or the page that you want.
On the Item Name Properties dialog box where Item Name is the name of the item that you selected, click the Directory Security tab.
NOTE: If the selected item is an individual file, click the File Security tab.
Under Anonymous access and authentication control, click Edit.
Click to select the Anonymous access check box to turn on anonymous access. To turn off anonymous access, click to clear this check box.
NOTE: If you turn off anonymous access, you need to configure some form of authenticated access.
To change the account that is used for anonymous access to this resource, click Edit next to Account used for anonymous access.
In the Anonymous User Account dialog box, click the user account that you want to use for anonymous access.
Click to clear the Allow IIS to control password check box if you want to use the Windows LogonUser() API for user authentication.
NOTE: By turning this password control option off, this forces IIS to use normal authentication and to log the account on locally. You should turn this option off if users experience difficulty accessing resources such as files or Microsoft Access databases on a network computer.
Click OK.
Under Authenticated access, click to select the Basic authentication (password is sent in clear text) check box to turn on basic authentication. When you receive the following message, click Yes:
The authentication option you have selected results in passwords being transmitted over the network without data encryption. Someone attempting to compromise your system security could use a protocol analyzer to examine user passwords during the authentication process. For more detail on user authentication, consult the online help. This warning does not apply to HTTPS (or SSL) connections.
Are you sure you want to continue?
To select a domain with which to authenticate users that are using basic authentication, click Edit next to Select a default domain.
Type the domain that you want in the Domain Name box, and then click OK.
Note If you are concerned about security on your intranet because Basic Authentication transmits user name and password information in clear text, you can use Basic authentication together with Secure Sockets Layer (SSL).
Click to select the Digest authentication for Windows domain servers check box to use digest authentication. When you receive the following message, click Yes:
Digest authentication works with Windows 2000 domain accounts only and requires the accounts to store passwords as encrypted clear text.
Are you sure you wish to continue?
NOTE: You must configure user accounts with the Store password using reversible encryption account option turned on.
Click to select the Integrated Windows authentication check box to use integrated Windows authentication.
NOTE: This authentication method was formerly known as Microsoft Windows NT Challenge/Response or NT LAN Manager (NTLM).
Click OK, and then in the Item Name Properties dialog box, click OK. If the Inheritance Overrides dialog box opens:
Click Select All to apply the new authentication settings to all of the files or the folders that are within the item that you changed.
Click OK.
Quit Internet Information Services.
Detect Active Directory User with ASP.NET
In IIS turn off anonymous authentication mode and select integrated windows security and basic. Then in your web.config file make sure you are using windows authentication. Then you should be able to access the user name by using
PHP Code:
User.Identity.Name
PHP Code:
User.Identity.Name
Wednesday, July 14, 2010
Adding Existing Project to Team Foundation Server
It should work fine if you have Team Explorer installed and Check under Tools-->Options -->Source Control--> Plug-in Selection. Here you should have the Visual Studio Team Foundation Server as the current source control plug-in.
The other option is to add the files manually to source control. Open the source control explorer (View -> Other Windows -> Source Control) and the either drag 'n drop the files into the source explorer window, or choose the Add files button in the toolbar which will be available at left top in source control window.
The other option is to add the files manually to source control. Open the source control explorer (View -> Other Windows -> Source Control) and the either drag 'n drop the files into the source explorer window, or choose the Add files button in the toolbar which will be available at left top in source control window.
Tuesday, July 13, 2010
Installing Adventureworks database in SQL Server 2005
It was hard to track down a useful reference for installing the AdventureWorks database - this one worked (almost). Just had to use regular SQL database, not sqlexpress, but that was easy to find by refreshing the database list.
Just in case the page disappears, copying here.
http://msdn.microsoft.com/en-us/library/aa992075(VS.80).aspx
Walkthrough: Installing the AdventureWorks Database
This walkthrough shows how to install the AdventureWorks sample database for SQL Server 2005, which is a prerequisite for other walkthroughs provided in the ReportViewer documentation. AdventureWorks is not automatically installed with SQL Server or SQL Server Express, but can be downloaded from a Microsoft Web site. You can use the instructions provided in this walkthrough to download, install, and configure a connection to the AdventureWorks database.
The version of AdventureWorks that is distributed with SQL Server 2005 is different from earlier versions AdventureWorks. If you already have a previous version of AdventureWorks, you should install the most recent version so that the queries in other ReportViewer walkthroughs work as expected.
To learn more about using the AdventureWorks sample database, you can search for "AdventureWorks Sample OLTP Database" in SQL Server 2005 Books Online. Books Online is available in most editions of Visual Studio 2005. You can view it on MSDN at www.microsoft.com. You can also download the "AdventureWorks OLTP Database Diagram" from http://www.microsoft.com/downloads/.
Prerequisites
--------------------------------------------------------------------------------
You must have a SQL Server instance installed for which you have permissions. If you installed SQL Server 2005 Express, the default instance name is (local)\sqlexpress. If you upgraded an MSDE instance to SQL Server 2005 Express, see the SQL Server Books Online topic "Upgrading MSDE to SQL Server Express".
The following steps describe how to download, save, attach, and configure the AdventureWorks database.
To download adventureworksdb.msi
--------------------------------------------------------------------------------
1.Navigate to this download Microsoft Web site. Double-click AdventureWorksDB.msi.
2.Click Run and complete the installation wizard. AdventureWorks_Data.mdf and AdventureWorks_Log.ldf are copied to your SQL Server data directory. For SQL Server 2005 Express, the default is c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\.
To confirm your SQL Server data directory
--------------------------------------------------------------------------------
1.Open a Visual Studio 2005 command window. From the Start menu, click All Programs, Microsoft Visual Studio 2005, Visual Studio Tools, Visual Studio 2005 Command Prompt.
2.Open a connection to a local SQL Server Express instance by typing or copying the following command into the command line:
CopySQLCMD -S (local)\sqlexpress -E
3.Press Enter.
4.At the SQLCMD prompt, type or copy the following commands.
Copyselect physical_name from sys.database_files where name = 'master'
go
This query returns the location of the file master.mdf, confirming the SQL Server data directory where you will place the AdventureWorks database files.
To attach AdventureWorks to your SQL Server
--------------------------------------------------------------------------------
1.At the SQLCMD 1> prompt, call the sp_attach_db stored procedure to attach the AdventureWorks database in the data directory determined in the previous step. The line below uses the default location for SQL Server 2005 Express. Edit the text as necessary to use the data directory confirmed in the previous steps. Type or copy and paste the following statement into the command window (the statement must not have line breaks).
Copyexec sp_attach_db @dbname=N'AdventureWorks', @filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
2.Type go.
3.Press ENTER. You may see a series of messages about converting and upgrading the database.
4.Type exit to close the command window.
To verify Adventureworks is attached
--------------------------------------------------------------------------------
1.Open Visual Studio 2005. You do not need to open a project.
2.From the View menu, choose Server Explorer.
3.In the Server Explorer window, right-click on Data Connections and choose Add Connection. The Add Connection dialog box opens.
4.Confirm Data source is set to Microsoft SQL Server (SqlClient).
5.In the Server name textbox, enter (local)\sqlexpress.
6.In Log on to the server, choose your method of authentication.
7.In Select or enter a database name, expand the list of databases.
8.Select AdventureWorks.
9.Click the Test Connection button to confirm that you have connected to AdventureWorks successfully.
Note
With a successful connection, you can right-click the data connection icon for AdventureWorks and select New Query to invoke a Query Expression window if you want to try out queries against this data source.
To configure AdventureWorks to work with Web server controls
--------------------------------------------------------------------------------
1.Open a Visual Studio 2005 command window to run SQLCMD. You will use SQLCMD to grant access to the database and ASP.NET account.
On Windows Server 2003, the ASP.NET process used by the Web server control runs under NT AUTHORITY\NETWORK SERVICE. On other Windows operating systems, the process runs under MACHINENAME\ASPNET.
If you installed SQL Server Express 2005, type or copy the following SQLCMD below to grant login authority to the service. Otherwise, you must specify the SQL Server instance you want to use in place of (local)\sqlexpress.
The following example works for Windows Server 2003 and must have no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -Q "sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'"
2.To grant access to AdventureWorks for this service, use the following command with no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -d AdventureWorks -Q "sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'"
3.To add this service to the owner role account for AdventureWorks, use the following command with no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -d AdventureWorks -Q "sp_addrolemember 'db_owner', N'NT AUTHORITY\NETWORK SERVICE'"
4.Close the command window.
5.You can confirm the configuration by successfully completing Walkthrough: Using a Database Data Source with the ReportViewer Web Server Control in Local Processing Mode.
Just in case the page disappears, copying here.
http://msdn.microsoft.com/en-us/library/aa992075(VS.80).aspx
Walkthrough: Installing the AdventureWorks Database
This walkthrough shows how to install the AdventureWorks sample database for SQL Server 2005, which is a prerequisite for other walkthroughs provided in the ReportViewer documentation. AdventureWorks is not automatically installed with SQL Server or SQL Server Express, but can be downloaded from a Microsoft Web site. You can use the instructions provided in this walkthrough to download, install, and configure a connection to the AdventureWorks database.
The version of AdventureWorks that is distributed with SQL Server 2005 is different from earlier versions AdventureWorks. If you already have a previous version of AdventureWorks, you should install the most recent version so that the queries in other ReportViewer walkthroughs work as expected.
To learn more about using the AdventureWorks sample database, you can search for "AdventureWorks Sample OLTP Database" in SQL Server 2005 Books Online. Books Online is available in most editions of Visual Studio 2005. You can view it on MSDN at www.microsoft.com. You can also download the "AdventureWorks OLTP Database Diagram" from http://www.microsoft.com/downloads/.
Prerequisites
--------------------------------------------------------------------------------
You must have a SQL Server instance installed for which you have permissions. If you installed SQL Server 2005 Express, the default instance name is (local)\sqlexpress. If you upgraded an MSDE instance to SQL Server 2005 Express, see the SQL Server Books Online topic "Upgrading MSDE to SQL Server Express".
The following steps describe how to download, save, attach, and configure the AdventureWorks database.
To download adventureworksdb.msi
--------------------------------------------------------------------------------
1.Navigate to this download Microsoft Web site. Double-click AdventureWorksDB.msi.
2.Click Run and complete the installation wizard. AdventureWorks_Data.mdf and AdventureWorks_Log.ldf are copied to your SQL Server data directory. For SQL Server 2005 Express, the default is c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\.
To confirm your SQL Server data directory
--------------------------------------------------------------------------------
1.Open a Visual Studio 2005 command window. From the Start menu, click All Programs, Microsoft Visual Studio 2005, Visual Studio Tools, Visual Studio 2005 Command Prompt.
2.Open a connection to a local SQL Server Express instance by typing or copying the following command into the command line:
CopySQLCMD -S (local)\sqlexpress -E
3.Press Enter.
4.At the SQLCMD prompt, type or copy the following commands.
Copyselect physical_name from sys.database_files where name = 'master'
go
This query returns the location of the file master.mdf, confirming the SQL Server data directory where you will place the AdventureWorks database files.
To attach AdventureWorks to your SQL Server
--------------------------------------------------------------------------------
1.At the SQLCMD 1> prompt, call the sp_attach_db stored procedure to attach the AdventureWorks database in the data directory determined in the previous step. The line below uses the default location for SQL Server 2005 Express. Edit the text as necessary to use the data directory confirmed in the previous steps. Type or copy and paste the following statement into the command window (the statement must not have line breaks).
Copyexec sp_attach_db @dbname=N'AdventureWorks', @filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
2.Type go.
3.Press ENTER. You may see a series of messages about converting and upgrading the database.
4.Type exit to close the command window.
To verify Adventureworks is attached
--------------------------------------------------------------------------------
1.Open Visual Studio 2005. You do not need to open a project.
2.From the View menu, choose Server Explorer.
3.In the Server Explorer window, right-click on Data Connections and choose Add Connection. The Add Connection dialog box opens.
4.Confirm Data source is set to Microsoft SQL Server (SqlClient).
5.In the Server name textbox, enter (local)\sqlexpress.
6.In Log on to the server, choose your method of authentication.
7.In Select or enter a database name, expand the list of databases.
8.Select AdventureWorks.
9.Click the Test Connection button to confirm that you have connected to AdventureWorks successfully.
Note
With a successful connection, you can right-click the data connection icon for AdventureWorks and select New Query to invoke a Query Expression window if you want to try out queries against this data source.
To configure AdventureWorks to work with Web server controls
--------------------------------------------------------------------------------
1.Open a Visual Studio 2005 command window to run SQLCMD. You will use SQLCMD to grant access to the database and ASP.NET account.
On Windows Server 2003, the ASP.NET process used by the Web server control runs under NT AUTHORITY\NETWORK SERVICE. On other Windows operating systems, the process runs under MACHINENAME\ASPNET.
If you installed SQL Server Express 2005, type or copy the following SQLCMD below to grant login authority to the service. Otherwise, you must specify the SQL Server instance you want to use in place of (local)\sqlexpress.
The following example works for Windows Server 2003 and must have no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -Q "sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'"
2.To grant access to AdventureWorks for this service, use the following command with no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -d AdventureWorks -Q "sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'"
3.To add this service to the owner role account for AdventureWorks, use the following command with no line breaks.
Copysqlcmd -E -S (local)\sqlexpress -d AdventureWorks -Q "sp_addrolemember 'db_owner', N'NT AUTHORITY\NETWORK SERVICE'"
4.Close the command window.
5.You can confirm the configuration by successfully completing Walkthrough: Using a Database Data Source with the ReportViewer Web Server Control in Local Processing Mode.
Thursday, July 8, 2010
change password remote desktop windows xp
when in xp mode, can't use cntrl-alt-end.
Instead, go to cntrl panel, shared user names and passwords, and change it there.
Use mixture of upper/lower case and some numerics.
Instead, go to cntrl panel, shared user names and passwords, and change it there.
Use mixture of upper/lower case and some numerics.
Subscribe to:
Posts (Atom)