How to Setup a VPN connection on Windows 7

by Shawn February 03, 2010 05:47
  1. Go to Control Panel and open Network and Sharing Center.
  2. Click on Set up a new connection or network.

  3. Select Connect to a workplace then click on Next.

  4. Select Use my internet connection (VPN)

  5. Type the IP address or computer name where you wish to connect and your connection name under the Destination name field.



    1. If connecting on a local resource or a LAN computer, you can type its computer name or IP address. The computer name shown here is taken from the previous tutorial Virtual Private Network (VPN) - Enable Incoming VPN Connections.
    2. If connection to a computer behind a router and DNS is enabled using the computer’s name, put that in the Internet address field. If no DNS has been configured, type in your router’s IP address.
    3. This section allows you to enable the use of a smart card, allow other users of your computer to access this connection and an option to disable immediate connection upon finishing the client setup.
  6. Enter a User name and password that has been granted access to the host computer. If you put a check mark on the Show password field, it will display your password instead of dots. You can also choose to save your password and enter a Domain.



    1. If you did not put a check mark on Don’t connect now, just set it up so I can connect later in Step 5, you will see a Connect button. Clicking on Cancel will discard all your settings. Clicking on Connect initiates the connection and you will see the following screens



      Then…



      NOTE: Upon successful connection, you will be prompted to classify the VPN connection as a Home, Work or Public Connection.
    2. If you did place a check mark on Don’t connect now, just set it up so I can connect later in Step 5, you will see a Create button. Clicking on Cancel will discard all your settings. Click on Create.
  7. To connect to using the created VPN connection, you can either right-click on the Network icon in the system tray and select Network and Sharing Center or go to Control Panel and open Network and Sharing Center, and click on Connect to a network.



    1. This will bring up a window on the lower right hand corner of your monitor, just above the system tray. Click on VPN Connection and a Connect button will be shown. Click on Connect.

  8. Connect VPN Connection windows appears. Clicking on Connect initiates the connection. Clicking on Properities allows you to modify the VPN Connection Properties as well as configure connection sharing.

Tip: To create a short-cut of the VPN connection you’ve created to your Desktop

  1. open Network and Sharing Center and select Change adapter settings,

  2. As you see our created VPN connection is now shown here

  3. Right-click on VPN Connection and select Create Shortcut. You will be prompted to create the shortcut to the desktop instead.


     

Tags:

Windows 7

Passthrough NTLM Authentication for FireFox

by Shawn January 27, 2010 11:01

In Firefox

  1. In the Address Bar, type: about:config and either press the ENTER key on the keyboard or click on the GO button

  2. On some machines you may get the warning message shown below.  If you follow our steps, you will NOT void your warranty

  3. When the new page appears with the configuration settings, In the Filter bar, search for NTLM and the result will show 3 entries. The one you need is NETWORK.AUTOMATIC-NTLM-AUTH.TRUSTED-URLS. Double-click the NETWORK.AUTOMATIC-NTLM-AUTH.TRUSTED-URLS entry to open the Enter string value window

  4. When the Enter the string value window opens, type the portal URLs that you wish to access automatically, separated by a comma. Note:  If you want to set it up for the entire domain, just enter .yourdomain.com

  5. When you are finished, click OK.
  6. You should now be able to nagigate to an NTLM protected website and access it without being prompt for credentials (as long as you current have access to it)

 

Tags: ,

Information | SharePoint | Windows

Windows Server 2008 as a Super Workstation

by Shawn January 25, 2010 09:12

Tags: ,

Windows

Design Time Support for Data in Blend and Visual Studio 2010

by Shawn January 13, 2010 06:36

Tags: , , , ,

Development

Installing Office Web Apps 2010 Beta 2

by Shawn December 15, 2009 03:42

I just deployed the Office Web Applications 2010 Beta. I followed the deployment document Microsoft has provided: http://www.microsoft.com/downloads/details.aspx?familyid=4AC8442D-0974-4902-84FE-1ADE382AB2A1&displaylang=en, but I ran into an error in the Activate the Office Web Apps services and feature by using Windows PowerShell chapter.

This is what the document says in the Create the service applications and the service application proxies paragraph:

After the service instances have been started, the service applications and the service application proxies which connect the Web front-ends to the service applications must be created. Create the service applications and the service application proxies by running the following script:

$appPool = Get-SPIisWebServiceApplicationPool –Name “SharePoint Web Services Default”
New-SPWordViewingServiceApplication –Name “WdView” –AppPool $appPool |
New-SPWordViewingServiceApplicationProxy –Name “WdProxy”
New-SPPowerPointServiceApplication –Name “PPT” –AppPool $appPool |
New-SPPowerPointServiceApplicationProxy –Name “PPTProxy”
New-SPExcelServiceApplication –Name “Excel”
-SPIisWebApplicationPool $appPool |

There are three errors in this script:

  1. The -Name parameter is invalid for the Get-SPIisWebServiceApplicationPool command. This should be -Identity.
  2. The -AppPool parameter is invalid for the New-SPWordViewingServiceApplication, New-SPPowerPointServiceApplication and New-SPExcelServiceApplication commands. This should be –ApplicationPool.
  3. The New-SPExcelServiceApplication is missing a command after the pipe (|).

I skipped the New-SPExcelServiceApplication command, cause my Excel Services Application Service was already created during the Farm Configuration Wizard. So the correct script is:

$appPoolName = "SharePoint Web Services Default"
New-SPWordViewingServiceApplication –Name "WdView" -ApplicationPool $appPoolName | New-SPWordViewingServiceApplicationProxy –Name "WdProxy"
New-SPPowerPointServiceApplication –Name "PPT" -ApplicationPool $appPoolName | New-SPPowerPointServiceApplicationProxy –Name "PPTProxy"
New-SPExcelServiceApplication –Name "Excel" -SPIisWebServiceApplicationPool $appPoolName

If you are looking for a single complete script that handles it all -- here you go

$machinesToActivate = @( gc env:computername )

$serviceInstanceNames = @("Word Viewing Service", "PowerPoint Service", "Excel Calculation Services")
foreach ($machine in $machinesToActivate) {
	foreach ($serviceInstance in $serviceInstanceNames) {
		$serviceID = $(Get-SPServiceInstance | where {$_.TypeName -match $serviceInstance} | where {$_.Server -match "SPServer Name="+$machine}).ID
		Start-SPServiceInstance -Identity $serviceID 
	} 
} 

$appPoolName = "SharePoint Web Services Default"
New-SPWordViewingServiceApplication –Name "WdView" -ApplicationPool $appPoolName | New-SPWordViewingServiceApplicationProxy –Name "WdProxy"
New-SPPowerPointServiceApplication –Name "PPT" -ApplicationPool $appPoolName | New-SPPowerPointServiceApplicationProxy –Name "PPTProxy"
New-SPExcelServiceApplication –Name "Excel" -SPIisWebServiceApplicationPool $appPoolName

$webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id
Get-SPSite –limit ALL |foreach { Enable-SPFeature $webAppsFeatureId –url $_.URL } 

And for a bonus if you want to enable the new Developer Dashboard in SharePoint 2010, here is the powershell script to do it

$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService

$ddsetting=$svc.DeveloperDashboardSettings

$ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand

$ddsetting.Update()

And here is the STSADM command
stsadm -o setproperty -pn developer-dashboard -pv OnDemand

Some additional information can be found here

Tags: ,

SharePoint

SQLite and Visual Studio 2010/.NET 4.0

by Shawn December 10, 2009 07:54

SQLite is one of those gems in the development community. When you need a small, lightweight, fast, and FREE embedded database there is nothing better out there.  To top it off, the guys at PhxSoftware have done an absolutely fantstic job of creating a complete ADO.NET 2.0 data provider for SQLite.  The only downside right now is that it has not been updated for .NET 4.0 and Visual Studio 2010.  That said for those of you chomping at the bit to work in the latest and greatest there is no need to fear as we have a work around to get you up runnng.

If you are gettting this exception:

System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime
and cannot be loaded in the 4.0 runtime without additional configuration information.

There is a solution that was first pointed out by Jomo Fisher. All you need to do is to include this snippet in the application config file:

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
</startup> 

Now, that said if you really want a native version it is possible as apparently recompiling the project and targeting .NET 4 works

  1. In order to compile sqlite.net with vs2010 beta 2 you can convert the 2008 solution. Before you convert the project files, you will need to remove the compact framework targets or the conversion will fail telling you that the compact framework is not supported.
  2. After the projects are converted set the targeted framework to .net 4

I could not get the netmodule to compile in vs2010 (it complained that the OutputType was not supported) but the netmodule will build when build from the command line with msbuild. The rest of the projects compile fine.

To get the designer to compile you will need to add a file called source.extension.vsixmanifest.The next thing I encountered was a System.TypeLoadException (Inheritance security rules violated by type). This could be solved by adding the following line to System.Data.SQLite/AssemblyInfo.cs

[assembly: SecurityRules(System.Security.SecurityRuleSet.Level1)]

There are some more minor changes to the project files to get it to compile but in the end it compiles with .NET 4 support and works without workarounds when used from .NET 4.

Tags: ,

Development

A useful tool set for working with DBF files

by Shawn November 30, 2009 06:25

CDBF from WhiteTown

cdbfwgui.zip (2.29 mb)

DBFViewer from cooolutils

DBFViewer.exe (1.62 mb)

And a nice shell extension for getting quick information about a DBF file

cdbfinfo.zip (341.77 kb)

Tags:

Development

Update to RDP Gadget

by Shawn November 29, 2009 03:33

I added support for more screen resolutions, fixed the connect to console bug on windows 7 and cleaned up some of the javascript code .

fxRDP.gadget (359.08 kb)

Tags:

Windows 7

A few helpful articles on SharePoint 2010 Beta 2

by Shawn November 23, 2009 04:34

Tags:

Social Networking

How to Alter a SQL Server Database as Single User Mode and as Multi User Mode

by Shawn November 20, 2009 01:51

Original Link: http://www.kodyaz.com/articles/alter-single-user-multi-user-mode.aspx

You can use the SQL Server Enterprise Manager for SQL Server 2000 to set a database to a single user mode or to multi user mode. Similarly, SQL Server Management Studio can be used for SQL Server 2005 for changing a database to single user mode or to multi user mode. Also you can alter the database access mode by using sql commands like ALTER DATABASE and sp_dboption.

 

ALTER DATABASE [Works] SET MULTI_USER WITH NO_WAIT

ALTER DATABASE [Works] SET SINGLE_USER WITH NO_WAIT

or

EXEC sp_dboption 'Works', 'single user', 'false'

EXEC sp_dboption 'Works', 'single user', 'true'

To alter the database state to restrict the access to the single user mode, first open the Microsoft SQL Server Management Studio, and connect to a SQL Server instance. Open the list of available databases belonging to the related instance in the Object Explorer window. Right click on the sql server database that you want to set its mode to single user and select Properties in the context menu.

When you click properties menu item, the following Database Properties screen will be displayed for the selected database. I used database named Works for samples used for the article.

restrict access

Select the Options page from the list in the left side of the screen. If you scroll down the options list for State options, you will see Restrict Access database options with three options listed in the combo box.

Restrict Access modes : Multiple, Single and Restricted modes.

 

If you select Single mode and click the OK button, you can either alter the database access mode to single user successfully or you will fail to change the access mode because of existence of active open connections to the Works database. The Management Studio IDE will prompt you to close all other connections to the related database for a successfull alter database option process.

open connections

To change the database properties, SQL Server must close all other connections to the database. Are you sure you want to change the properties and close all other connections?
 

After the alter command runs successfully, the database Works will be displayed as shown in the Object Explorer window.
single-user

 

If an active connection exists other than the Management Studio, and you click the database Works within the SQL Server Management Studio, the following warning message will be displayed:


database-is-not-accessible

The database Works is not accessible. (ObjectExplorer)

 

If you right click on the database Works, the following error message will be displayed.

database-is-already-open

Database 'Works' is already open and can only have one user at a time. (Microsoft SQL Server, Error: 924)

 

After a database is altered as single user mode, it can be altered again back to multi user mode by running the below sql command.

ALTER DATABASE [Works] SET MULTI_USER WITH NO_WAIT

But if this command is run from a connection that is not the only active connection to the related database, the command will fail with the following message:

Msg 5064, Level 16, State 1, Line 1
Changes to the state or options of database 'Works' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.

 

 

In a case that you want to alter the database access mode from single user mode to multi user mode or from multi user mode to single user mode, you may have to kill all the active open connections to the database.

In such a case, you have to find all the open connections and run "Kill @spid" command to close all the connections.

For a list of open connections for a specific database you can run a similar command as below :

select spid from master..sysprocesses where dbid = db_id('Works') and spid <> @@spid

The second part of the task will be closing the open connections with the Kill command. This can be achived by running kill commands within a cursor or creating a dynamic sql command which kills the active connections to the related database.

Let's code the closing open connections using a t-sql cursor:

DECLARE @DatabaseName nvarchar(50)
DECLARE @SPId int

SET @DatabaseName = N'Works'

DECLARE my_cursor CURSOR FAST_FORWARD FOR
SELECT SPId FROM MASTER..SysProcesses WHERE DBId = DB_ID(@DatabaseName) AND SPId <> @@SPId

OPEN my_cursor

FETCH NEXT FROM my_cursor INTO @SPId

WHILE @@FETCH_STATUS = 0
BEGIN
KILL @SPId

FETCH NEXT FROM my_cursor INTO @SPId
END

CLOSE my_cursor
DEALLOCATE my_cursor

 

After all connections are closed except the currently running prcess (@@spid) if we are trying to alter the access mode of the database that we're in from multi user mode to single user mode, we can now run the ALTER DATABASE command for single user mode or multi user mode.

ALTER DATABASE [Works] SET MULTI_USER WITH NO_WAIT

or

ALTER DATABASE [Works] SET SINGLE_USER WITH NO_WAIT

 

You can also use the following sp_dboption sql commands to alter the database option for single user. If you set the "single user" database option to "true", this is same as altering the database as "SINGLE_USER" with ALTER DATABASE statement.


USE master
GO
EXEC sp_dboption 'Works', 'single user', 'false';


If you run the below sp_dboption command which sets the "single user" to "false", this is same as altering the database as "MULTI_USER" with ALTER DATABASE statement.


USE master
GO
EXEC sp_dboption 'Works', 'single user', 'true';

 

The main difference between sp_dboption and ALTER DATABASE commands is that, sp_dboption will not be supported with further releases of SQL SERVER after SQL SERVER 2005.

Tags:

Development

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant