This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From https://blogs.msdn.microsoft.com/carlosag/2006/04/17/microsoft-web-administration-in-iis-7/ | |
Creating a Site | |
ServerManager iisManager = new ServerManager(); | |
iisManager.Sites.Add(“NewSite”, “http”, “*:8080:”, “d:\\MySite”); | |
iisManager.Update(); | |
This basically creates an instance of the ServerManager class and uses the Add method in the Sites collection to create a new site named “NewSite” listening at port 8080 using http protocol and content files are at d:\MySite. | |
One thing to note is that calling Update is a requirement since that is the moment when we persist the changes to the configuration store. | |
After running this code you have now a site that you can browse using http://localhost:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- URL FONT: http://www.motobit.com/tips/detpg_sql-find-text-stored-procedure/ | |
-- ============================================= | |
-- Author: Antonin Foller, www.foller.cz | |
-- Create date: 2007-09-19 | |
-- Description: Search a text in stored procedure source code. | |
-- @text - any text to find, search is done by like '%text%' | |
-- @dbname - database where to search, | |
-- - if omitted, all databases in the SQL server instance | |
-- ============================================= | |
ALTER PROCEDURE [dbo].[find_text_in_sp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
sp_async_execute - asynchronous execution of T-SQL command or stored prodecure | |
2012 Antonin Foller, Motobit Software, www.motobit.com | |
URL FONT: http://www.motobit.com/tips/detpg_async-execute-sql/ | |
*/ | |
CREATE PROCEDURE sp_async_execute(@sql varchar(4000), @jobname varchar(200) = null, | |
@database varchar(200)= null, @owner varchar(200) = null ) AS BEGIN | |
SET NOCOUNT ON; | |
declare @id uniqueidentifier |
NewerOlder