You get a nice error that says, “A new guard page for the stack cannot be created”, well easy fix. I could be long winded, but the issue is simply this, you caused a stack overflow.
How you say? Well, check to see if you are using a Server.Transfer that transfers you to a page that then Transfers you back and forth, or even to yourself.
Have login code that checks to see if you are logged in? If not, then it bounces you to a login page. Maybe you put it in a master page. Well, if the login page uses the master page, it will just keep transferring itself to itself and you blow the stack.
Response.Redirect will give you a different error as the browser only jumps a low number of redirects before giving up. Server.Transfer uses the internal stack, so it blows up on the server itself.
If you did what I did, and just picked the default IIS installation options for your Windows 7 box, then you probably get a bunch of fun errors.
This one is if you didn’t install IIS support for asp.net. (WHICH SURPRISE, IS NOT DEFAULT SELECTED)
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
The fix is to install ASP.NET support. Easy.
Now, why the error from the title? Why no PageHandlerFactory blah blah blah? Well, .NET didn’t register itself with IIS the way it wants, so you need to rectify that.
That is also easy. Never hard if you have the right tool, it’s finding the right tool that is hard.
Open a Command prompt with Administrative Privileges. (Key, otherwise it doesn’t work).
go to your Framework folder. %WINDIRMicrosoft.NET
Pick the one you are working with, and the right bit type. i.e. 64 if your on 64 bit. Then the right version. I use 4.0
Call aspnet_regiis.exe -i
Voila, your done. Restart IIS and try your page again.
So, you load your Silver light application and get excited to view it for the first time on your web server. Boom!
You get a blank screen. Or if you have debugging enabled, you get an error trying to load Silverlight application file. hmmmm. What can this be?
Try typing in the direct url for the xap file on your server and you get “The request is not supported”.
It turns out it is simply the MIME type for XAP not being registered. Register it on your IIS server and problem solved.
Here is a nice post about how to do that .
I had to create a test ssl certificate to use with my WCF service.
Here is the simple way to do it in 2 Easy Steps!
1) Open the Visual Studio 2008 Command Prompt
2) Fire off this command. change bseekford00111 to your computer name or whatever name you want the certificate to be.
makecert -r -pe -n "CN=bseekford00111" -b 01/01/2000 -e 01/01/2050 -eku 22.214.171.124.126.96.36.199.1 -ss my -sr CurrentUser -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
That is all there is to it.
It will drop it in the current user MY store. If you want it under local machine store, change CurrentUser to LocalMachine