MediaSmartServer.net
http://mediasmartserver.net/forums/

WHS Port Forward Add-In
http://mediasmartserver.net/forums/viewtopic.php?f=10&t=4987
Page 2 of 5

Author:  Diehard [ Fri Jul 31, 2009 9:34 pm ]
Post subject:  Re: WHS Port Forward Add-In

yakuza wrote:
Ok, so this Add-In works via the WHS UPnP infrastructure, can you help me come up with some informational warnings that inform users that if WHS won't configure their router, this Add-In will not work?

Server logs are located in c:\documents and settings\all users\application data\microsoft\windows home server\logs

Ah, that's what I gathered from the podcast. You said that you use the home server API's to configure a router that supports uPnP. The thing is, my router does support uPnP, this is why I thought it would work. it's just that the WHS API has trouble accessing the uPnP configuration of my router. PP1 configured my router properly but PP2 does not.

So the test is " Can "WHS Remote Access" configure your router that must have uPnP support ?" and not just your router must support uPnP.

warning " if WHS won't configure "Remote Access" on your router, this Add-In will not work"

Thanks, I'll have to convert a WRT-54G to run on tomato. :)
I hope I don't come off sounding like an ass here :oops:

Author:  yakuza [ Fri Jul 31, 2009 10:17 pm ]
Post subject:  Re: WHS Port Forward Add-In

No, not like an ass, that is helpful. :)

Have you checked in your router's config area to see if the ports you created with this add-in are forwarded? I'd also like the exception from that server console log so I know how to catch the error and not crash the console.

Author:  Diehard [ Fri Jul 31, 2009 10:35 pm ]
Post subject:  Re: WHS Port Forward Add-In

yakuza wrote:
No, not like an ass, that is helpful. :)

Have you checked in your router's config area to see if the ports you created with this add-in are forwarded? I'd also like the exception from that server console log so I know how to catch the error and not crash the console.


No, The ports did not forward automatically.
Do you know where I can clear those entries ? I can't from the addin.

I have included a photo of the manual entries.

Attachments:
N1-2.PNG
N1-2.PNG [ 8.09 KiB | Viewed 60851 times ]
N1-1.PNG
N1-1.PNG [ 39.3 KiB | Viewed 60851 times ]

Author:  jc634 [ Fri Jul 31, 2009 10:52 pm ]
Post subject:  Re: WHS Port Forward Add-In

yakuza wrote:
Thanks Diehard, that helps, I have an idea of what's going on. Is WHS able to configure your router for Remote Access, or do you have to manually forward ports?

Jim, when you re-open the console do the ports show up in the list?

Both of you, an exception from the ServerConsole log would be the most helpful to determine the cause of the console crash.

Edit: As a note, it's been hard to test the negative cases, as my Tomato powered WRT-54G works awesome with UPnP and WHS, which is why you two are hitting these cases. Thanks for your debug help.


Yes, the ports show up fine. From the log file at the time I took the Event pix contains this:

[22]090731.212721.5781: Error: Exception thrown
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.NetFwTypeLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Microsoft.HomeServer.HomeServerConsoleTab.WHSPortForward.HomeServerSettingsExtender.DoAdd() in HomeServerConsoleTab.WHSPortForward.dll
at System.Threading.ThreadHelper.ThreadStart_Context(Object state) in mscorlib.dll
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in mscorlib.dll
at System.Threading.ThreadHelper.ThreadStart() in mscorlib.dll


Does that help?

Author:  yakuza [ Fri Jul 31, 2009 11:10 pm ]
Post subject:  Re: WHS Port Forward Add-In

Diehard, I need the exception from the HomeServerConsole log, similar to what Jim has shown below.

Jim, are you running on a MediaSmart Server? If not, this could explain something for me. Can you verify that the file Interop.NetFwTypeLib.dll does NOT exist in C:\Program Files\Windows Home Server\ on your server, please?

Author:  Diehard [ Fri Jul 31, 2009 11:21 pm ]
Post subject:  Re: WHS Port Forward Add-In

yakuza wrote:
Diehard, I need the exception from the HomeServerConsole log, similar to what Jim has shown below.

Jim, are you running on a MediaSmart Server? If not, this could explain something for me. Can you verify that the file Interop.NetFwTypeLib.dll does NOT exist in C:\Program Files\Windows Home Server\ on your server, please?


Is this it ?

[50]090731.214629.9687: Error: Exception thrown
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at NetFwTypeLib.INetFwOpenPort.set_Port(Int32 portNumber) in Interop.NetFwTypeLib.dll
at Microsoft.HomeServer.HomeServerConsoleTab.WHSPortForward.HomeServerSettingsExtender.DoAdd() in HomeServerConsoleTab.WHSPortForward.dll
at System.Threading.ThreadHelper.ThreadStart_Context(Object state) in mscorlib.dll
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in mscorlib.dll
at System.Threading.ThreadHelper.ThreadStart() in mscorlib.dll

Sender: Name:homeserverconsole.exe
There are no context policies.

Author:  jc634 [ Fri Jul 31, 2009 11:27 pm ]
Post subject:  Re: WHS Port Forward Add-In

yakuza wrote:
Diehard, I need the exception from the HomeServerConsole log, similar to what Jim has shown below.

Jim, are you running on a MediaSmart Server? If not, this could explain something for me. Can you verify that the file Interop.NetFwTypeLib.dll does NOT exist in C:\Program Files\Windows Home Server\ on your server, please?


My WHS is self-built, so no, it is not a MSS. And the file (inter....dll) does not exist in the specified directory.

FWIW, I honestly did not expect the UPnP to work with my router. If, in the end, it does that would be fantastic and I will bow to your greatness at that point! :D

I just want to make sure at this point that your add-in behave nice when things don't work as it thinks they should. It can be scary to users when the console closes like it did for me. I've played with too many add-ins now to have something like that effect me anymore. I am just looking to make your add-in better.

Author:  yakuza [ Fri Jul 31, 2009 11:30 pm ]
Post subject:  Re: WHS Port Forward Add-In

Diehard, that's it, thanks. I'm not sure why you're getting that error, but I'm resolving the other issue and will have a test build for you and Jim shortly.

Jim, understood, I greatly appreciate your assistance helping me improve the error handling. I agree, I want things to fail gracefully! :)

I'm partly done here, I'll PM you both in a bit with an updated build to test if you don't mind.

Author:  CBick [ Sat Aug 01, 2009 9:41 am ]
Post subject:  Re: WHS Port Forward Add-In

I have an Belkin N1 Vision router.

The add-in works when you first set it up.

A few hours later I will start getting a yellow notification that portforwarding has failed.

If I refesh the remote access details it will usually come back with all green checks still.

Sometimes there will be red X's on 2 of them. If I click repair it will usually come back good & the details will refresh with all green checks.

A few times it was not able to repair itself & the only way I could find to fix the problem was to turn off upnp on the router and then turn it back on. If you then click repair whs will fix itself.

To be honest I am looking for any reason that I can find to throw this Belkin N1 Vision router away & get another one.
If it wasn't for the $149 price that I paid for it I would have already chunked it.
I have heard that the Belkin N1 Vision version 2000 has resolved most of the issues. To bad that I have version 1000.

Author:  Diehard [ Sat Aug 01, 2009 10:17 am ]
Post subject:  Re: WHS Port Forward Add-In

CBick wrote:
I have an Belkin N1 Vision router.

The add-in works when you first set it up.

A few hours later I will start getting a yellow notification that portforwarding has failed.

If I refesh the remote access details it will usually come back with all green checks still.

Sometimes there will be red X's on 2 of them. If I click repair it will usually come back good & the details will refresh with all green checks.

A few times it was not able to repair itself & the only way I could find to fix the problem was to turn off upnp on the router and then turn it back on. If you then click repair whs will fix itself.

[
I have heard that the Belkin N1 Vision version 2000 has resolved most of the issues. To bad that I have version 1000.[/color]


Hi,

I also read that the V2000 has fixed a few bugs, I have the Firmware Version
F5D8232-4_WW_2.00.03
Boot Version
1.04
Hardware
F5D8232-4 v2000

but still get some issues. Like you see here.I enjoy having the LCD screen to show me when Live Mesh or Keep Vault is updating.
I'm sure that my problem is related to WHS Remote Access, because as I stated earlier, PP1 configured my router properly while PP2 does not.

Hopefully maybe you Alex, can figure out what has changed in Remote access to fix this.

Author:  alexh [ Sat Aug 01, 2009 1:20 pm ]
Post subject:  Re: WHS Port Forward Add-In

EX470 - WHS PP2, HP MSS 1.3.8.25155

Installation went fine. I opened the Console (using remote desktop) and selected the add-in. What I found strange, unlike the screen grabs here there were no ports listed! Not understanding what to do now, I thought I'd click on Add port, and it crashed.

Quote:
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 01/08/2009
Time: 20:09:05
User: N/A
Computer: SERVER
Description:
EventType clr20r3, P1 homeserverconsole.exe, P2 6.0.0.0, P3 49ed39c1, P4 whscommon, P5 6.0.0.0, P6 49b73949, P7 334, P8 1b, P9 system.io.filenotfoundexception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 68 00 6f 00 6d 00 .h.o.m.
0018: 65 00 73 00 65 00 72 00 e.s.e.r.
0020: 76 00 65 00 72 00 63 00 v.e.r.c.
0028: 6f 00 6e 00 73 00 6f 00 o.n.s.o.
0030: 6c 00 65 00 2e 00 65 00 l.e...e.
0038: 78 00 65 00 2c 00 20 00 x.e.,. .
0040: 36 00 2e 00 30 00 2e 00 6...0...
0048: 30 00 2e 00 30 00 2c 00 0...0.,.
0050: 20 00 34 00 39 00 65 00 .4.9.e.
0058: 64 00 33 00 39 00 63 00 d.3.9.c.
0060: 31 00 2c 00 20 00 77 00 1.,. .w.
0068: 68 00 73 00 63 00 6f 00 h.s.c.o.
0070: 6d 00 6d 00 6f 00 6e 00 m.m.o.n.
0078: 2c 00 20 00 36 00 2e 00 ,. .6...
0080: 30 00 2e 00 30 00 2e 00 0...0...
0088: 30 00 2c 00 20 00 34 00 0.,. .4.
0090: 39 00 62 00 37 00 33 00 9.b.7.3.
0098: 39 00 34 00 39 00 2c 00 9.4.9.,.
00a0: 20 00 33 00 33 00 34 00 .3.3.4.
00a8: 2c 00 20 00 31 00 62 00 ,. .1.b.
00b0: 2c 00 20 00 73 00 79 00 ,. .s.y.
00b8: 73 00 74 00 65 00 6d 00 s.t.e.m.
00c0: 2e 00 69 00 6f 00 2e 00 ..i.o...
00c8: 66 00 69 00 6c 00 65 00 f.i.l.e.
00d0: 6e 00 6f 00 74 00 66 00 n.o.t.f.
00d8: 6f 00 75 00 6e 00 64 00 o.u.n.d.
00e0: 65 00 78 00 63 00 65 00 e.x.c.e.
00e8: 70 00 74 00 69 00 6f 00 p.t.i.o.
00f0: 6e 00 20 00 4e 00 49 00 n. .N.I.
00f8: 4c 00 0d 00 0a 00 L.....

Author:  yakuza [ Sat Aug 01, 2009 9:13 pm ]
Post subject:  Re: WHS Port Forward Add-In

alexh, I'm surprised to hear of this on the EX470, can you please check the ServerConsoleLog as I mentioned a couple posts back? I'm looking for a more detailed version of the FileNotFound exception.

Author:  alexh [ Sun Aug 02, 2009 4:20 am ]
Post subject:  Re: WHS Port Forward Add-In

There are 10's of files in that directory; I'm posting the contents of two which may be relevant.

HomeServerConsole.log
Quote:
[1]090802.112749.2031: BackupConfig: Error: Disconnected Backup Config
[1]090802.112749.3593: BackupConfig: Error: Disconnected Backup Config
[1]090802.112749.7031: BackupConfig: Error: Disconnected Backup Config
[13]090802.112751.5468: Error: Backup percentage is -2147483648
[13]090802.112751.5468: Error: Cannot invoke RefreshData for HealthControl
[13]090802.112754.5468: Error: Backup percentage is -2147483648
[13]090802.112754.5468: Error: Cannot invoke RefreshData for HealthControl
[1]090802.112755.1562: Error: Error -2147023728 in SendMessage
[17]090802.112802.1718: Error: Backup percentage is -2147483648
[17]090802.112802.1718: Error: Cannot invoke RefreshData for HealthControl
[18]090802.112822.6718: Error: Backup percentage is -2147483648
[18]090802.112822.6718: Error: Cannot invoke RefreshData for HealthControl
[1]090802.112823.7500: Error: Cannot invoke RefreshData for HealthControl
[1]090802.112823.7500: Error: Error -2147023728 in SendMessage
[1]090802.112827.8281: Error: Error -2147023728 in SendMessage
[1]090802.112835.5312: Error: Error -2147023728 in SendMessage
[1]090802.112840.3906: Error: Error -2147023728 in SendMessage
[40]090802.112842.8593: Error: Exception thrown
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.NetFwTypeLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Microsoft.HomeServer.HomeServerConsoleTab.WHSPortForward.HomeServerSettingsExtender.DoAdd() in HomeServerConsoleTab.WHSPortForward.dll
at System.Threading.ThreadHelper.ThreadStart_Context(Object state) in mscorlib.dll
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in mscorlib.dll
at System.Threading.ThreadHelper.ThreadStart() in mscorlib.dll

Sender: Name:HomeServerConsole.exe
There are no context policies.

Portforwarding.log
Quote:
[02/08/2009 00:00:00]
[02/08/2009 00:08:29 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 00:23:34 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 00:38:39 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 00:53:45 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 01:08:50 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 01:13:56 fc0] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 01:13:56 fc0] MAIN: Service shutting down.
[02/08/2009 01:13:57 df8] INIT: Service is down.
MAIN: Exited
[02/08/2009 09:15:47 c10]

Main started
[02/08/2009 09:15:47 c10] MAIN: COM initialized successfully
[02/08/2009 09:15:47 c30] INIT: Service received OnStart event.
[02/08/2009 09:15:47 c30] INIT: Service started.
[02/08/2009 09:15:47 c34] MAIN: Main service thread started initialization
[02/08/2009 09:15:47 c34] MAIN: Registering COM object
[02/08/2009 09:15:47 c34] MAIN: Declaring service as running
[02/08/2009 09:15:53 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 09:30:58 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 09:46:03 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 10:01:08 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 10:16:13 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 10:31:18 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 10:46:24 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 11:01:29 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 11:16:34 c34] Could not GetGenricPortMapping with hr=0x80004005
[02/08/2009 11:31:39 c34] Could not GetGenricPortMapping with hr=0x80004005

Author:  yakuza [ Sun Aug 02, 2009 1:51 pm ]
Post subject:  Re: WHS Port Forward Add-In

Very strange that you don't have the Interop file on your EX470, mine at the same software version DOES have it. :-k Regardless, I believe I have a fix for that and am working on it now, should have an update tonight/tomorrow at the latest.

Author:  phlow [ Sun Aug 02, 2009 3:20 pm ]
Post subject:  Re: WHS Port Forward Add-In

Alex -

Thanks much for creating this add-in sounds like a great concept. However, upon copying it to the addins directory then enabling it from WHS console, it appears that my WHS console no longer works. It goes through the log in procedure, validates password, then just comes up with Blank window. (Windows Home Server Console, just Blue Background) I have validated this on other boxes connected to the WHS.

I am running a Belkin N F5D8233-4-va(01A) UPnP router.

Has anyone had similar issues?

Page 2 of 5 All times are UTC - 7 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/