Friday, 22 July 2016

Set File Permissions so SQL can see external drives

If you want to host your databases on an external USB hard disk, it may be required to set the file system permissions on the drive so SQL can see it.

SQL uses a virtual account so its not always easy to set the permissions. To do this, go into the security tab and add a new user. Change the Location to the Local Machine, then enter the following name MSSQL$[InstanceName]

  1. Using Windows Explorer, navigate to the file system location where the database files are stored. Right-click the file system folder, and then clickProperties.
  2. On the Security tab, click Edit, and then Add.
  3. In the Select Users, Computer, Service Account, or Groups dialog box, click Locations, at the top of the location list, select your computer name, and then click OK.
  4. In the Enter the object names to select box, type the name of the per-service SID name listed in the Books Online topic Configure Windows Service Accounts and Permissions. (For the Database Engine per service SID name, use NT SERVICE\MSSQLSERVER for a default instance, orNT SERVICE\MSSQL$InstanceName for a named instance.)
  5. Click Check Names to validate the entry. (If the validation fails, it might advise you that the name was not found. When you click OK, a Multiple Names Found dialog box appears. Now select the per-service SID name, either MSSQLSERVER or NT SERVICE\MSSQL$InstanceName, and then click OK. Click OK again to return to the Permissions dialog box.)
  6. In the Group or user names box, select the per-service SID name, and then in the Permissions for  box, select the Allow check box forFull control.
  7. Click Apply, and then click OK twice to exit.
https://msdn.microsoft.com/en-us/library/jj219062.aspx




Friday, 18 December 2015

Great Solarized Theme

http://ethanschoonover.com/solarized

Tuesday, 27 January 2015

Great article for finding memory leaks

http://www.codeproject.com/Articles/42721/Best-Practices-No-Detecting-NET-application-memo

Monday, 28 April 2014

How to expose DevExpress ClientSideEvents in a User Control

User Control:
Markup:

Code Behind:

Page:
Markup:

Code Behind:

Monday, 9 September 2013

Extension methods for rounding time up and down

Wednesday, 4 September 2013

Here is a generic extension method to clamp values for any IComparable Type.

Friday, 26 July 2013

Select all / all on page checkbox ASPxGridView

http://www.devexpress.com/Support/Center/Example/Details/E1682

Monday, 15 July 2013

Great way to stop session timeout

http://weblogs.asp.net/stevewellens/archive/2009/06/09/ah-ah-ah-ah-staying-alive-staying-alive.aspx

Tuesday, 2 July 2013

Remove Edit / Cancel links from ASPxGridView edit form

Add an Edit Form Template Replacement..

Tuesday, 11 June 2013

Add a print button for ReportViewer Reports in Google Chrome

Set up your report viewer as follows:

Friday, 31 May 2013

Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

IE 10 issue with Image buttons in update panel. Replace the buttons with something other than an image button

Wednesday, 29 May 2013

How to add a filter results button to search items on click rather than automatically - ASPxComboBox DevExpress

Tuesday, 14 May 2013

Download a file

How to transmit a file to a browser for download..

Thursday, 7 February 2013

InstallShield Service install Error 1001

Within the InstallShield full application: Look at Tools->Options->.NET and check to see that you are using the correct version of InstallUtilLib.dll ( in the correct .net version folder)

Installshield log setup

Setup.exe /v"/l*v \"c:\My Log Files\test.log\""

Wednesday, 6 February 2013

Convert DataTable to CSV and download to client

Friday, 1 February 2013

Virtual PC - Get Virtual PC's to see each other

If you are using virtual PC and they cant see each other, try setting the network card to the card that is installed in the host machine ( not NAT, or Shared Networking )

Wednesday, 23 January 2013

InstallShield. .net install class service not uninstalled

If you are using install shield, and uninstalling the application but a service is left it could be caused by the system thinking the dll's are shared between other applications.

To resolve this, simply remove the entries relating to your application from the following registry key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls

This should then allow the service to install / uninstall naturally.

Additionally, you need to check all of the components of the InstallShield install to make sure they are not set as 'Shared' This stops them from being uninstalled.

Delete windows service from command line

sc delete "servicename"

The service name can be found by right clicking on the service in the services window, and checking the service name field.

Monday, 21 January 2013

Install Shield ISDEV: error: 0

This error can happen if there are readonly files in the install project directory