Joseph Michael Pesch
VP Programming

IIS Application Pool (AppPool) Using Default Identity of "ApplicationPoolIdentity"

by 10. March 2015 04:46

To assign Windows security (for example local folder permissions) to the ApplicationPoolIdentity user there is a user for each website like this: IIS APPPOOL\website

 


Tags:

Installing and Configuring Web Deploy on IIS 8.0 or Later

by 10. March 2015 04:37

 

1) Install the "Web Platform Installer" (version 4.6 at time of this post).

2) Use the "Web Platform Installer"to install the "Recommended Server Configuration for Web Hosting Providers" (search for "recommended" should locate this item).

 

See full blog post here: http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later

 


Tags:

Microsoft SQL Server TSQL Script to View All User Role Assignments

by 10. March 2015 04:01

 

/* The following will list all user role assignments in current database */


WITH RoleMembers (member_principal_id, role_principal_id)
AS
(
  SELECT
   rm1.member_principal_id,
   rm1.role_principal_id
  FROM sys.database_role_members rm1 (NOLOCK)
   UNION ALL
  SELECT
   d.member_principal_id,
   rm.role_principal_id
  FROM sys.database_role_members rm (NOLOCK)
   INNER JOIN RoleMembers AS d
   ON rm.member_principal_id = d.role_principal_id
)
select distinct rp.name as database_role, mp.name as database_user
from RoleMembers drm
  join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
  join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
order by rp.name

/* The following will list all user role assignments in all databases except master and tempdb */

create table #tmp(DatabaseName varchar(150), DatabaseRole varchar(150), DatabaseUser varchar(150))

declare @command varchar(max)

select @command = '
if ''?'' not in(''master'', ''tempdb'')
begin
    print ''?''
    use [?]
  ;
  WITH RoleMembers (member_principal_id, role_principal_id)
  AS
  (
    SELECT
     rm1.member_principal_id,
     rm1.role_principal_id
    FROM sys.database_role_members rm1 (NOLOCK)
     UNION ALL
    SELECT
     d.member_principal_id,
     rm.role_principal_id
    FROM sys.database_role_members rm (NOLOCK)
     INNER JOIN RoleMembers AS d
     ON rm.member_principal_id = d.role_principal_id
  )
  insert into #tmp select distinct ''?'', rp.name, mp.name
  from RoleMembers drm
    join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
    join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
  order by rp.name

end
'
exec sp_msforeachdb @command1 = @command

select * from #tmp

drop table #tmp

Tags:

SQL Server

ASP.Net Visual Studio General XML Configuration File Transformation

by 3. March 2015 05:19

Slow Cheetah is a Visual Studio addin (VSIX Installer available here: https://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5) that enables build specific transformations for any XML configuration file (similar to the out of the box Visual Studio support for Web.config transformation files).  Here is a blog from Scott Hanselman talking about the tool: http://www.hanselman.com/blog/SlowCheetahWebconfigTransformationSyntaxNowGeneralizedForAnyXMLConfigurationFile.aspx

 

Tags: