Reputation: 1074
I have an ASP.Net MVC application developed on my system. I want to access my site from remote computer by binding my app with public IP using following Commands,
netsh http add urlacl url=http://192.168.1.42:3000/ user=everyone
in Visual Studio i have updated applicationhost.config file
<binding protocol="http" bindingInformation="*:3000:192.168.1.42" />
but it is still not working saying
"Service Unavailable
HTTP Error 503. The service is unavailable."
Upvotes: 2
Views: 1195
Reputation: 1
public string GetIp()
{
string Ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrEmpty(Ip))
{
Ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
}
return Ip;
}
Upvotes: 0
Reputation:
In applicationhost.config file the localhost must be changed to your computer name.
Upvotes: 0