Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Debugging network access issue
spadyrist
#1 Posted : Tuesday, October 25, 2011 7:59:38 PM(UTC)
Groups: Member
Joined: 10/25/2011(UTC)
Posts: 2
Location: Toronto

Was thanked: 1 time(s) in 1 post(s)
Hi,

I am trying to host my application using Web Server Pro and everything works perfectly when I am accessing it from the local system. But the network access does not work. I tried to use IP address and computer name, but was not able to access the application.

Could you please suggest how can I debug this issue, to find the root cause?

Thanks!
Ultidev Team
#2 Posted : Tuesday, October 25, 2011 8:13:17 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

The best way is to attach Visual Studio debugger to the UWS process hosting your application. The host process name starts with "UWS.AppHost.ClrX" and process ID can be found in UWS Explorer when you select a your application's host in the left panel (see attached screenshots).

After that you will be able to use debugger to find out what's going on.

Please let us know if this information was helpful.

Best regards,
UltiDev Team.
Ultidev Team attached the following image(s):
Ultidev Team attached the following image(s): UWS Explorer shoing host process ID.png
Ultidev Team attached the following image(s): Visual Studio Attach to Process with UWS host processes.png
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
spadyrist
#3 Posted : Tuesday, October 25, 2011 8:27:40 PM(UTC)
Groups: Member
Joined: 10/25/2011(UTC)
Posts: 2
Location: Toronto

Was thanked: 1 time(s) in 1 post(s)
Thanks, will try it.

Looks like a firewall issue - by disabling Windows Firewall on the system where server is installed (Windows 7) I can resolve it. Is it expected that the users need to modify Firewall setting before hosting the network facing sites?
1 user thanked spadyrist for this useful post.
Ultidev Team on 10/25/2011(UTC)
Ultidev Team
#4 Posted : Tuesday, October 25, 2011 11:23:37 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Thank you for reporting this. Our installer is supposed to create an exception in Windows firewall, but it's an old piece of code that got broken by one of more recent changes, hence it's a bug. If you look at Windows firewall exceptions, you'll find ones for our web server, but they are pointing to dllhost.exe, instead of UWS.AppHost. We'll fix it in the next release.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
newahkow
#5 Posted : Wednesday, December 7, 2011 2:01:19 AM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi I am using build 14 and I have the same problem in Vista 32-bit and Windows 7 64-bit.

Initially I added exception to the following programs (UDP and TCP, Public and Private profile) but I can't still access my web app from LAN:
c:\program files (x86)\UltiDev\Web Server\UWS.AppHost.Clr4.x86.exe
c:\program files (x86)\UltiDev\Web Server\UWS.AppHost.Clr4.AnyCPU.exe
c:\program files (x86)\UltiDev\Web Server\UWS.AppHost.Clr2.x86.exe
c:\program files (x86)\UltiDev\Web Server\UWS.AppHost.Clr2.AnyCPU.exe

My web app is hosted using port 81. When I run this command (in Vista and 7 64-bit): netstat -ao | find "LISTENING"
It shows that 0.0.0.0:81 and [::]:81 is hosted by process id 4, which is "System".

So I had to add "Inbound Rules" for port 81 in Windows Firewall, then I can access the web app from LAN.
Is that the correct way?

Thank you very much.
Ultidev Team
#6 Posted : Wednesday, December 7, 2011 9:49:06 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Since UWS build 12, Windows Firewall rules are now adjusted every time UWS registers and unregisters an application, so there is no need to manually change Windows Firewall rules. If you bring up Windows Firewall Advanced Settings window, you should see something like attached screenshot.

Please let us know if you have firewall issues with the latest UWS build.

Best regards,
UltiDev Team.
Ultidev Team attached the following image(s):
Ultidev Team attached the following image(s): UWS Windows Firewall Rules.png
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
newahkow
#7 Posted : Wednesday, December 7, 2011 8:37:51 PM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
I think I found the problem.

UWS adds the port rule but only to the "Private" profile.
If I tick "Domain" and "Public" (under "Advanced" tab of "UltiDev Web Server Pro" rule properties), then I can access from LAN.

The scope (under 'Scope' tab) may also cause problem since the "Remote IP address" is set to "Local subnet" only. IP outside the LAN may not be able to access web apps.
Ultidev Team
#8 Posted : Wednesday, December 7, 2011 10:24:59 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Would you mind describing your case in a little more detail? Where both machines, client and UWS server on the same subnet, and were any of the machines on a domain and in a workgroup? We are asking because depending on where client and server are residing, automatic firewall settings could have been correct (or not).

Thank you in advance,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
newahkow
#9 Posted : Wednesday, December 7, 2011 10:47:10 PM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

Our application are meant to be accessed from internet, so we need the rules to be set in "All profiles" and "Remote IP address" to be "Any IP address".
UWS server <---> Internet <---> clients


However, here's my current development environment (all on the same subnet):
-Clients joins a domain
-UWS are installed in machines that join the same domain.
-UWS are also installed in virtual machines (to test against various OS), which are on the same subnet but does not join the domain.

Clients cannot access UWS (both real or virtual machines) unless "Public" profile is ticked in the firewall rule. Ticking "Domain" profile does not work.
Ultidev Team
#10 Posted : Thursday, December 8, 2011 12:46:16 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

We have retested a use case where two systems are in the same subnet, one in a domain and another in a work group, and we had no trouble making them accessing one another with firewall on, with exceptions created only by UWS. We have tested Windows 7 and Windows XP. We have tested these scenarios before with quite a few permutations and always had expected results. We are at loss as to what is going on.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
newahkow
#11 Posted : Thursday, December 8, 2011 2:11:32 AM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Thanks. Here's what I found after some testing:

I guess UWS add firewall rules using current network profile, as shown in Network and Sharing Center. Eg, if the current profile is Private, rules will be added to Private profile.

My development machine has a real network interface (Domain network) and a virtual network interface (Private network).
If I disable the virtual network interface, UWS will add rules to Domain profile. Clients can access UWS in this scenario.
If I enable the virtual network interface, UWS will add rules to Private profile. Clients cannot access UWS in this scenario, unless I tick 'Public' in the rule. I don't know why but 'Private' and 'Domain' just don't work, maybe this is a bug in Windows Firewall.

Would it be better if UWS just add rules to 'All profiles'? Users may change profile without UWS knowing it.


Another thing is, UWS only create firewall rules when I click "Save config changes" in UWS Explorer. It does not add rules when Metabase.RegisterApplication() is called in a program.
Ultidev Team
#12 Posted : Thursday, December 8, 2011 8:26:12 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

When creating firewall exception, UWS uses current machine's profile, meaning that if computer is a member of a domain, it adds exceptions to the Domain profile. If not, it adds them to the Private profile. Creating exception for the Public profile would be a serious security problem - because most people don't realize UWS alters their firewall settings, so it would expose their boxes to Internet traffic without most users knowing it. That's the reason we don't do it.

Please verify whether you are running your application registration from within elevated user account. Application registration process has several steps requiring elevated privileges, with one of the steps being creating firewall exceptions. UWS Explorer runs the same configuration/registration API call, Metabase.RegisterApplication(), as you do when you call it - that's why we think the difference is security context.

Please let us know if this information was helpful.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
1 user thanked Ultidev Team for this useful post.
newahkow on 12/8/2011(UTC)
newahkow
#13 Posted : Thursday, December 8, 2011 8:56:19 PM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Thanks! Guess I will have to add the rule myself.

Metabase.RegisterApplication() is run under a separate application which requires elevated account.
Ultidev Team
#14 Posted : Thursday, December 8, 2011 11:55:43 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi,

We are sorry, we are unclear, does app registration API call still fail to create any firewall exception rule?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
newahkow
#15 Posted : Sunday, December 11, 2011 10:42:18 PM(UTC)
Groups: Member
Joined: 10/11/2011(UTC)
Posts: 19

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi, Metabase.RegisterApplication() does create the rule when running under elevated account. The problem is, as you said for security reason, it won't create to Public profile even though the current network is public. So my solution is to make my application create another rule to Public.
Ultidev Team
#16 Posted : Sunday, December 11, 2011 11:06:17 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Thank you for posting.

Please be cautious with opening up firewall to outside world - users should probably hit some kind of "I accept terms and conditions" button before your installer opens them up to the outside world.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.