I have a server (windows server 2008 r2) which hosting an asp.net web application locally using IIS. I also have several client PCs connected to the network which allow client PCs to access the website locally by hostname or IP address (e.g. http:// server / or http:// 192.168.1.200 /)
My Internet connection is not stable, up and down (disconnect) quite frequent. Because of that I discovered that my web application access from client PCs is smooth (load time less than 5 secs per page) when my Internet connection is ON (connected), but on the other hand, when the Internet connection is down (disconnected), access to the web application from client PCs take around 15-17 secs to complete the page load, every pages.
I doubt that this is related to IIS itself or my configuration is wrong.
Is there anyone else having the same issue? Any fixes?
Problem resolved.
I didn't know that System.net.dns.gethostentry require Internet to work properly. So I have disable this function for my system to run smoothly now.
Related
I am trying to host an ASP.NET website on IIS for a customer. I can access the website by IP/domain locally but not when using another device (another IP).
Here are all the details that are worth mentioning:
Ports are open (Checked with telnet)
Using Application Pool identity
Logs under C:\inetpub\logs\LogFiles\W3SVC2 show: 200 response for local IP but 302 response for all remote IPs.
Accessing the default IIS website works locally and remotely
Any clues why this may be happening? I already spent more than 6 hours on this so I am willing to try any guess at this point.
PS: I am totally novice when it comes to IIS and ASP.NET
I have created ASP.NET API endpoints on my Windows 10 PC, hosted on IIS. Using Chrome's extension app, Postman, I could call the API internally within the same machine (using localhost and even my own local IP). Example:
http://localhost/UserService/api/user/getByUsername?username=abc
and
http://192.168.0.160/UserService/api/user/getByUsername?username=abc
Then I tried using another PC (Windows 7) to connect to the same Wifi LAN that my Windows 10 PC is connected to, and attempted to call the above example URL via Postman, but it did not get through (getting "Could not get any response"error). The Windows 7 PC could not call API hosted on Windows 10 PC.
However, when I reversed the setting ie to host on Windows 7's IIS (version 7.5) and used Windows 10 PC to call instead, no issue found.
What went wrong?? Is it due to some Firewall settings?
A few things to check in Windows Firewall with Advanced Security:
Have you enabled the World Wide Web Services (HTTP Traffic-In) rule
in Windows firewall exceptions?
Do you have any entries in the Remote Computers tab?
Is the action Allow the connection?
What is the content of your Advanced tab like?
EDIT
Based on your comments, the issue is indeed a firewall issue, but not Windows Firewall with Advanced Security. McAfee firewall is blocking external access to port 80. Add an exception to McAfee to allow port 80, and possibly 443. Consult McAfee's knowledge base.
With great help from #reckface, the root cause is found, which is in fact the McAfee antivirus itself. After exploring around the UI, I found the setting to allow incoming traffic for certain port(s) without needing to turn off firewall setting entirely.
With "Web Server (HTTP) Port 80" enabled on the UI, I can now access API's from another PC.
I installed on my server, a Bug tracker which is accessible through port 3000 (http://myserver:3000).
Every thing is ok on my server, i can access to my web application any time, but in my job's computer, i cannot even connect to this application and no other web application which run on different port other than 80.
I have added a role on the windows Firewall settings by letting connection to and from port 3000. But same result.
If some one have a solution to this, i'll be thankful.
Best Regards
Is it possible that your work network is blocking your home machine. Can you ping your home machine or access it with its ip address? When you type
http://myserver:3000
are you doing this from the local intranet? If you have your bug server on your home machine then you won't be able to access
http://myserver:3000
from your work machine without a fully qualified domain nae or ip address?
If the above answers are all resolved then whenever I have such difficulties on windows, I do the following. If you don't have admin rights you might not be able to do this.
temporarily disable all firewall/antivirus programs.
Start web server listening on port 80 (on your home machine)
Access from a different machine if this works then
Start web server on 3000
Access from a different machine.
If it works then it is a matter of finding whether the problem was that the web request was being blocked by the firewall or antivirus. In your case it appears it might be the antivirus. To confirm disable all antivirus for a moment.
Make sure you turn your antivirus/firewall back on once the problem is diagnosed!
I have 2 servers, server A and server B. Both have IIS7 and same OS. I published through my VS2008 the same website on both servers. the problem is on one the application in IIS7 website works on the other it doesnt.
Server A - IIS7 - WebsiteA - Application (Works)
Server B - IIS7 - WebsiteA - Application (Does not work)
what are the things that i could be missing to configure IIS7 in server B ?
You need to find out what machine the IP Address is referring to.
It's possible you have firewall's, routers, and host configuration files which are effecting this.
Run a tracert to your server, and to the ip address and see where your route is going wrong.
Check you don't have multiple IP Addresses assigned to the same machine.
If you can, ask a member of your network team to help you out.
To help you more, we need to know the details of your infrastructure.
I am writing an application that downloads large files in the background. All clients are logged in locally, or through a VPN. When they are logged in locally, I do not want to throttle downloads. However, I would like to limit downloads to 10 KBps when the user is connected via VPN. I can differentiate between these users by IP Address range.
Since this is an AIR Application, I figure I will throttle via server-side since I can do it from either the server itself (IIS 6) or the web service (asp.net / C#).
Throttling through IIS 6 seems to work fine, but it seems like it has to be done across the entire web site. Is there anyway to do this via IP? Or will I have to rig this up in .NET?
My first thought is this. I don't know if it would work but it would only take a few minutes to try.
Create two IIS web sites on the same server. The first site is bound to the public IP, but the second site is bound to the private IP. Both point to the same folder on the file system.
Your VPN users will be accessing via the private IP, so you can setup a "site-wide" rule on that site that will only affect VPN users. This should work for almost any IIS6 setting, including bandwidth throttling.
Worth a try, at least.
--
Edit: Tried this and it worked flawlessly.