2014년 1월 25일 토요일

iis ftp 데이터 채널 포트 범위 회색 / 비활성





위 처럼 일반 사이트를 선택하시면 안되고,





트리 노드중 가장위의 localhost 를 선택후, FTP 방화벽 지원을 선택 하시면
수정가능 합니다.

SOLVED: iis ftp data channel port range greyed out / disable





don't select site






select local node(http://localhost/) in left tree.



2014년 1월 20일 월요일

asp.net (C#) WebMethod return string

index.cs index.aspx index.cs 에서 return 은 data.d 로 넘겨준다.

2014년 1월 19일 일요일

MongoDB path in spacebar (windows)


If your path includes spaces, enclose the entire path in double quotations, for example: 

C:\mongodb\bin\mongod.exe --dbpath "d:\test\mongo db data"

2014년 1월 10일 금요일

node.js + express + swig + socket.io

express + swig + socket.io 입니다.
var port=3000;

var swig  = require('swig'),
    express = require('express'),
    app = express(),
    io = require('socket.io').listen(app.listen(port));

    app.engine('html', swig.renderFile);
    app.set('view engine', 'html');
    app.set('views', public_dir);

    // Swig will cache templates for you, but you can disable
    // that and use Express's caching instead, if you like:
    app.set('view cache', false);
    // To disable Swig's cache, do the following:
    swig.setDefaults({ cache: false });
    // NOTE: You should always cache templates in a production environment.
    // Don't leave both of these to `false` in production!
    app.get('/', function (req, res) {
      res.render('index', {  
        pagename: 'awesome people',
        authors: ['Paul', 'Jim', 'Jane']
      });
      
    });

io.sockets.on('connection', function (socket) {
  // socket code
});
이렇게 작성하면 app.get 부분에서 index 에 pagename: 'awesome people', authors: ['Paul', 'Jim', 'Jane'] 이 값을 넘겨줍니다. 그럼 index.html 에선

{{ pagename|title }}

    {% for author in authors %}
  • {{ author }}
  • {% endfor %}
이런 식으로 쓰겠죠..

 참고자료
 swig 예제 : http://paularmstrong.github.io/swig/
 swig + express : http://paularmstrong.github.io/swig/docs/#express
 express + socket.io : http://socket.io/#how-to-use (Using with the Express web framework)