Latest 100 public snipts »
ludicco's
snipts » server
showing 1-3 of 3 snipts for server
-
∞ Web.config ASP.NET MVC SQL SERVER/EXPRESS - Development x Production
<connectionStrings> <remove name="LocalSqlServer" /> <!-- DEVELOPMENT - SQLEXPRESS --> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=True;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;User Instance=True" providerName="System.Data.SqlClient" /> <!-- PRODUCTION - SQLSERVER --> <add name="ApplicationServices" connectionString="Data Source=MACHINE_NAME;Initial Catalog=DataBaseName;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
-
∞ IIS7 start
Open the applicationHost.config file, located here: %windir%\system32\inetsrv\config\applicationHost.config In my instance, I need to edit the "handlers" section. Change this line: <section name="handlers" overrideModeDefault="Deny" /> To: <section name="handlers" overrideModeDefault="Allow" /> %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers appcmd unlock config -section:system.webServer/modules on ISS activate modules to run ISAP FastCGI ASP.NET etc...
-
∞ Ruby FTP Server Files Transfer
require 'net/ftp' ftp = Net::FTP.new('example.com') ftp.login(user = "****", passwd = "****") ftp.putbinaryfile("/data/images/myimage.jpg", File.basename( "/data/images/myimage.jpg" )) ftp.quit() #passive mode (works on railsmachine, heroku, etc) ftp = Net::FTP.open("ftp.example.com") do |ftp| ftp.login(user = "*****", passwd = "*****") ftp.passive = true ftp.putbinaryfile("public/data/myimage.jpg", File.basename( "myimage.jpg" )) ftp.quit()


