Browsing articles tagged with ".net - Admins Goodies"
Sep 1, 2012
tom

Connecting two IPs like an URL

I haven’t found answer anywhere, so here comes the question. My ISP connected me to a router with thousands of other clients, so my public IP is the same as many others. And I want to make a small private server which can be accessible across whole web. So my home router shows me IP 10.x.x.x and actually my public IP is 89.x.x.x. Is there any way to reach the IP 10.x.x.x from the Internet? [...]

Continue Reading »
Jul 16, 2012
tom

How do I load this .NET DLL into the Global Assembly Cache for COM access?

I built a DLL on my 64bit Windows 7 machine in Visual Studio 2010. The project is a class library. I copied the whole project folder to our 64 bit Windows 2008 Server Web to try and make the library accessible to ASP classic websites we have running on the server. The server has the 4.0 .NET framework installed. This command: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin>gacutil /i c:\portalClasses\portalClasses\bin\debug\portalClasses.dll Produces this result: This assembly is built by a [...]

Continue Reading »
Jul 4, 2012
tom

How can I run a .exe file every hour automatically?

I’m using Windows Server 2008 R2. I’ve created a .NET console application and deployed it to the server. If I double click the .exe application, it runs well and does it’s job. This application has to update values on a database. I need to be able to run this every hour automatically. How can I achieve this? Asked by Sergio The windows task scheduler allows you to regularly run a program. It’s in the control [...]

Continue Reading »
May 25, 2012
tom

How to list available ADSI (Active Directory Service Interfaces) service providers?

How can I list available ADSI (Active Directory Service Interfaces) service providers? On StackOverflow no one knows, so they advised me to ask here. Asked by TN. this works, googled “script list of adsi providers” WScript.Echo( listProviders() );function listProviders() { var list = “ADSI Providers on this machine\n” ); list += “==============================\n” ); var ads = GetObject( “ADs:” ); var e = new Enumerator( ads ); for( ; !e.atEnd(); e.moveNext() ) { var mem = [...]

Continue Reading »
May 8, 2012
tom

Why does the .NET Folder.CopyHere Method not allow dialog suppression for .ZIP files when run within a SQL Server Agent PowerShell job step?

I am using PowerShell in a SQL Server Agent job step to automate the extraction of .ZIP file contents to a directory. Based upon highest-voted answer on this question: How to zip/unzip files in Powershell? I am using this code: $dir_source = “\\myserver\myshare\” $dir_destination = “\\myserver2\myshare2\” $file_source = Get-ChildItem -Path (Join-Path -Path $dir_source -ChildPath “test.zip”)$shell_app = New-Object -com shell.application $zip_file = $shell_app.namespace($file_source.FullName) $destination = $shell_app.namespace($dir_destination) $destination.Copyhere($zip_file.items(),20) The vOptions optional parameter of the CopyHere method is [...]

Continue Reading »
Mar 19, 2012
tom

How to install php, mysql, apache and visual studio on same computer?

from 3 years, I am unable to find the solution for this thing, I want to use http://localhost/ for either for XAMPP for PHP testing, and something like http://localhost:32465/ default locations for Visual Studio for .NET C# and ASP.NET. Is this possible to run both on same computer. I want to learn both of them. ——————————– Update : Thanks nnichols, I did your way. Thanks everyone for helping me. ——————————– Asked by Mohan Sinfh You [...]

Continue Reading »
Feb 21, 2012
tom

ASP.Net / IIS permissions or configuration issue

We have a 3 server web farm running an ASP.Net 3.5 application on IIS6, windows server 2003. We just installed an update to the application, and two of the three servers were fine but the third immediately started having problems. Trying to start the web site we see this exception in the logs: System.IO.FileLoadException: Could not load file or assembly ‘System.EnterpriseServices.Wrapper.dll’ or one of its dependencies. This application has failed to start because the application [...]

Continue Reading »
Feb 20, 2012
tom

Monitor message queues

I’m looking for a simple way to monitor RabbitMQ queues from SCOM. In particular, I want to be notified when a particular queue (one we use for “dead letters”) is not empty. RabbitMQ has a RESTful web API (the RabbitMQ Management HTTP API) that will return the desired data; it only supports JSON. I’ve already wrapped the call to that in a .NET library. I’ve written a PowerShell script to interface between that and SCOM, [...]

Continue Reading »
Jan 20, 2012
tom

Error when sending email via outlook, Does this require a server application?

Requirement: My application has a requirement to send emails via outlook. I could accomplish this using Outlook = Microsoft.Office.Interop.Outlook; The application works fine on development environment but iam getting an exception: System.Runtime.InteropServices.COMException (0×80040154): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0×80040154 (REGDB_E_CLASSNOTREG)) Detailed: System.Runtime.InteropServices.COMException (0×80040154): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the [...]

Continue Reading »
Jan 20, 2012
tom

Caching an Umbraco website running on IIS 7.x with .NET 4.0 on an AWS EC2 instance

What are the available options for caching an Umbraco website on AWS EC2? So far, we’ve considered using Varnish but it’s not recommended for a production environment. Is there a de-facto HTTP accelerator for IIS like Varnish? https://www.varnish-cache.org/ It is a legacy website, so I’m not 100% certain that all the necessary caching has been performed within the application code (e.g. macro caching) We’re aiming to meet a traffic profile of 60 page requests a [...]

Continue Reading »