Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Tuesday, 18 August 2009

How to install ASP.Net on x64 platforms

After more than a couple of years, many service pack and a version of Visual Studio later, we still need to deal with Enable32bitAppOnWin64, aspnet_regiis.exe and the likes to properly install Asp.Net on x64 platforms.

I wonder when and if Microsoft will make this less time consuming ..

Thursday, 14 August 2008

When you see 2148074254 remember 896861

A new mantra for all the hatelovers of IIS and VMWare
If you see 2148074254 (well, mostly 401 2 2148074254), remember 896861.
Camon, train with me:
if you see 2148074254 remember 896861
if you see 2148074254 remember 896861
if you see 2148074254 remember 896861
if you see 2148074254 remember 896861
if you see 2148074254 remember 896861
...
Believe me, earlier or later it will save you hours ;)

Thursday, 22 May 2008

Host headers on IIS with SSL

Do you wish to serve multiple web sites on the same IIS 6.0 server over SSL, using the same IP and the same 443 port? From the Windows 2003 server pack 1 you can.

Get a wildcard ssl certificate (i.e. with the common name *.yourwebsite.com), assign that wildcard ssl certificate to any website in your IIS, then ran the following commands for each website from C:\Inetpub\AdminScripts:

cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>"

In example, if you wish to publish 3 websites called web, blog and mail identified in IIS as 1, 2 and 3, you have to run the following commands:

cscript.exe adsutil.vbs set /w3svc/1/SecureBindings ":443:web.yourwebsite.com"

cscript.exe adsutil.vbs set /w3svc/2/SecureBindings ":443:blog.yourwebsite.com"

cscript.exe adsutil.vbs set /w3svc/3/SecureBindings ":443:mail.yourwebsite.com"

More infos here.

Monday, 12 March 2007

Mutex could not be created

Working with ASP.Net, have you ever got a:

Server Error in '/xxx' Application. -------------------------------------------------------------------------------- Mutex could not be created.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. bla bla bla ..

I have solved it in various way, but so far the best workaround I have got (thanks mostly to a post of a chap called Joao Morais) is the following:
  • - If you have visual studio 2005 is open, close it
  • - Go to the ASP.NET temporary folder for v2.0 of the framework
  • \Microsoft.Net\Framework\v2.0\Temporary ASP.NET pages
  • - Remove the folder for your application (or all of them)
  • - Reset IIS (on a command line window, >iisreset) [not always needed, but I had to use it sometimes]
  • - First Browse your page from IE (http://localhost/your app)
  • - Then reopen Visual studio
I can only add that a aspnet_regiis -ga \ before resetting IIS, is usually helping, as in 64 bit environments to try to enable/disable the Enable32bitAppOnWin64 IIS Metabase properties.

cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 0
%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i


cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i


Warning: this is a brute force approach, a bit like formatting an hard disk because the operating system got some cold, use with discrection!