Accessing an IIS Express site from a remote computer

Sometimes (waaaay to often) I have to check that a site I’m working on looks like it should in Internet Explorer 6, Safari on Mac or some other browser that I can’t run in Windows 7. In this case I wanted to access it from IE6 running in XP Mode.  I could of course deploy it to IIS and make it publicly available, but since I’m now using IIS Expressfor running my sites from Visual Studio instead of the built-in web server Cassini, it almost simple to let other computers on my network access the site.

This post by Scott Hanselman almost describes how to do it, but since I had to make some adjustments I thought I might write a shorter post with just the steps you need for this.

1 – Bind your application to your public IP address

Normally when you run an application in IIS Express, it’s only accessible on http://localhost:[someport]. In order to access it from another machine, it needs to be bound to your public IP address as well. Open C:\Users\[YourName]\Documents\IISExpress\config\applicationhost.config and find your site. You will find something like this:

1
2
3
4
5
6
7
8
<site name="Alpha.Web" id="2">
    <application path="/">
        <virtualDirectory path="/" physicalPath="C:\Users\Johan\HgReps\Alpha\Alpha.Web" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:58938:localhost" />
    </bindings>
</site>

In <bindings>, add another row:

<binding protocol="http" bindingInformation="*:58938:192.168.1.42" /> (But with your IP, and port number, of course)

2 - Allow incoming connections

If you’re running Windows 7, pretty much all incoming connections are locked down, so you need to specifically allow incoming connections to your application. First, start an administrative command prompt. Second, run these commands, replacing 192.168.1.42:58938 with whatever IP and port you are using:

> netsh http add urlacl url=http://192.168.1.42:58938/ user=everyone

This just tells http.sys that it’s ok to talk to this url.

> netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=58938 profile=private remoteip=localsubnet action=allow

This adds a rule in the Windows Firewall, allowing incoming connections to port 58938 for computers on your local subnet.

And there you go, you can now press Ctrl-F5 in Visual Studio, and browse you site from another computer!


http://johan.driessen.se/posts/Accessing-an-IIS-Express-site-from-a-remote-computer


http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

Posted by [czar]
,

민지사진

카테고리 없음 2012. 11. 14. 10:45



Posted by [czar]
,

http://www.withinwindows.com/2012/06/28/workaround-for-windows-8-freezing-issues/



bcdedit /set disabledynamictick yes



http://www.youtu.kr/1024245


윈도우8 프리징(freezing) 현상 문제 해결 방법


명령 프로프트(관리자권한)에서 아래와 같이 실행해주고, 리부팅해주면 해결됩니다.



C:\> bcdedit /set disabledynamictick yes

Posted by [czar]
,

윈도우8 사용자 폴더 위치 변경하기

c:\users 폴더를 d:\users 폴더로 이동


Step 1: Boot to Repair Mode


usb나 cd로 윈도우8로 부팅하여 복구 모드로 
Boot to Repaire mode Windows 8

Windows 8 repair boot option

Windows 8 repair boot option - troubleshoot

Windows 8 repaire boot option command prompt



Step 2: Copy user profile directory over

사용자 폴더 복사   

c:\>xcopy /e /k /o /h c:\users d:\users

Step 3: Delete the original Users folder
원래 폴더 삭제
c:\>rd /s c:\users

Step 4: Make the connection

c:\>mklink /d c:\users d:\users

Windows 8 change default user profile explorer


출처 : 
http://www.windows7hacker.com/index.php/2012/09/how-to-change-user-profile-location-in-windows-8-without-registry-hack/

Posted by [czar]
,


/**

 * 픽셀단위를 현재 디스플레이 화면에 비례한 크기로 반환합니다.

 *

 * @param pixel

 *            픽셀

 * @return 변환된 값 (DP)

 */

public static int PixelToDp(Context context, int pixel) {

DisplayMetrics metrics = context.getResources().getDisplayMetrics();

float dp = pixel / (metrics.densityDpi / 160f);

return (int) dp;

}


/**

 * 현재 디스플레이 화면에 비례한 DP단위를 픽셀 크기로 반환합니다.

 *

 * @param DP

 *            픽셀

 * @return 변환된 값 (pixel)

 */

public static int DpToPixel(Context context, int DP) {

float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, DP, context.getResources().getDisplayMetrics());

return (int) px;

}



private float dpFromPx(float px)
{
    return px / this.getContext().getResources().getDisplayMetrics().density;
}


private float pxFromDp(float dp)
{
    return dp * this.getContext().getResources().getDisplayMetrics().density;
}

Posted by [czar]
,

윈도우8 안전모드로 부팅하는 방법


Shift + F8


Posted by [czar]
,
탭메뉴가 있는 Activity 에서

private
OnTabChangeListener TabChangeListener = new OnTabChangeListener() { @Override public void onTabChanged(String tabId) { if (tabId.equals("download")){ mlocalActivityManager.dispatchPause(isFinishing()); mlocalActivityManager.dispatchResume(); tabs.setCurrentTab(1); } } };



or

LocalActivityManager lam;
lam = new LocalActivityManager(this, false);
lam.dispatchCreate(savedInstanceState);
mMyTabHost.setup(lam);
@Override
public void onPause() {
    super.onPause();
    try {
        mlam.dispatchPause(isFinishing());
    } catch (Exception e) {}
}

@Override
public void onResume() {
    super.onResume();
    try {
        mlam.dispatchResume();
    } catch (Exception e) {}
}



Posted by [czar]
,

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

Posted by [czar]
,

show variables like 'lower_case_table_names%'



mysql> show variables like 'lower_case_table_names';

+------------------------+-------+

| Variable_name          | Value |

+------------------------+-------+

| lower_case_table_names | 0     |

+------------------------+-------+

1 row in set



my.cnf 에서 1로 값 변경

[mysqld]

lower_case_table_names=1

Posted by [czar]
,

@Autowired
private ServletContext servletContext;
public void setServletContext(ServletContext servletContext) {
	this.servletContext = servletContext;
}

@Override
   
public void setServletContext(ServletContext servletContext) {
       
this.servletContext=servletContext;
   
}



servletContext.getRealPath("/");

Posted by [czar]
,