Can some help me convert this ASP Resource to ASP.NET?
We're on the verge of upgrading to 9.5 but don't want to lose this functionality.
It puts the HP Management Homepage on the node details page.
JB
JB,
We too have number of custom ASP resources that need to be converted. Some are very simple, and others are quite extensive and complex. I have yet to crack the code required to make them work now that the ASP proxy has been removed from 9.5, but if I figure it out, I'll certainly circle back around to this post again.
Wish I could help...
Sure. I attached an asp.net version. Hopefully this will be helpful to others with resources to convert. Note: I added ".txt" to the end of the filename to make the forum happy. The proper file name should be "HPManagementHomePage.ascx". ASP.NET resources must have a .ascx extension.
I should also point out that this resource is simple enough that you don't really need to bother with code at all. The Custom HTML Resource can do this job just fine. Add a Custom HTML Resource to your view, then click its EDIT button and enter this text:
<table width="100%"> <tr> <td colspan="4"> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tr> <td class="Property" width="10"> </td> <td class="PropertyHeader">HP Management Homepage</td> <td class="Property"> </td> <td class="Property"><a href="https://${IP_Address}:2381" target="_blank">https://${IP_Address}:2381</a> </td> </tr> </table> </td> </tr> </table>
The "${IP_Address}" macros will get replaced with the IP Address of the current node. This will work just fine in any version of Orion.
Some pointers to other stuff on the web for people getting started with ASP.NET:
http://www.asp.net/learn/
www.codeproject.com/.../aspnetintro.aspx
www.dotnetspider.com/.../AspNet-Tutorials.aspx
www.amazon.com/.../
Thanks!
I also thought that this was too simple so I created a new Resource for my HP Servers and added it to that. Here's snipit of the code...
<tr> <td class="Property" width="10"> </td> <td class="PropertyHeader">Management Homepage</td> <td class="Property"> </td> <td class="Property"><a href="https://<%#Eval("IPAddress")%>:2381" Target="_blank">https://<%#Eval("IPAddress")%>:2381</a> </td> </tr>
Tim- thanks for the input. Just to clarify:
The old *.Resource files that were the classic ASP files must now be *.ascx files.
Also, I assume as before they go in the respective location with respect to the type of view that they will be added to (summary, node details, etc)? -> .\Inetpub\SolarWindsNPM\Orion\NetPerfMon\Resources\*******
Yes, that's right. Actually, in your path (.\Inetpub\SolarWindsNPM\Orion\NetPerfMon\Resources\*******) the "*******" doesn't affect what type of view they go in. That's controlled by the "RequiredInterfaces" property in the code for the resource. The "*******" directory just controls what group they go in on the Add Resource to View page.
One last (and EXTREMELY complicated) question about the new .NET resources.
We used a classic ASP resource and several static tables in the database to create a sort of system inventory that was tied to each node- it just displayed some simple stats such as CPU type, Memory installed, etc. Being that my .NET knowledge accounts to about zero, I'm stabbing in the dark here.
With the classic ASP, the 'NetPerfMon.NewSQLResource' was used a ton...and I'm at a loss as to how to replicate that functionality. I can't find a similar function- I assume it's all embeded in the DLLs or somewhere else. While I'm sure it would be possible to set up a new connection to the DB simply to read some static data, I figured it would be easier to use something like the NewSQLResource...is there such a thing?
I was afraid the old .resource files would go away. I did something special where I took the code from the interface details Min/Max/Average bps In/Out resource and put it in the Current Percent Utilization of Each Interface resource so that we could click a single link and get a current graph of each interface.
It ended up working beautifully for some of the veiws we wanted. I thought I looked at the .Net code for it but it was much more complicated. I think I got lucky with the other. I was hoping SW would add that as an option sometime.
Here is the file...
tdanner
I have been able to get the code to work. I am new to ASP.NET and C#. I am trying to access a customer table that we created in SolarWinds. Attached is the modified ascx.
Am I referencing everything correctly?
If not how do I need to reference this properly?
Thank you,
Charles
I haven't tested it, but I don't see any obvious errors. If it is working for you, cool.
I got your original code to work. But my code is not working. Not sure why. It should have been a custom table not customer table.
So I've take a ASP.NET resource, modified it a bit and tried to add it to my website.
I saved it as 06-<Resource_Name>.ascx under \Inetpup\SolarWinds\Resources\0-1-NodeLists. I then lauched the Configuration Wizard to recompile the website and after it's done it just deletes my file and I cannot find it under Resources.
What am I doing wrong?
PS: I'm using NPM 12.0.1.
Where exactly do you have to copy the ascx file? Do you have to run Configuration Wizard afterwards? I've tried different things from this thread but I seem to be missing something.
I am trying to get filtered events to work under 12.0.1
Anyone know why this would not work?
https://thwack.solarwinds.com/docs/DOC-107687#start=25