Last post Apr 14, 2008 02:59 AM by tcorneto
Nov 27, 2007 11:30 PM|tcorneto|LINK
I finally was able to post my site live today and it works for the most part. I'm using the Jeremy Wadsworth (thanks Jeremy!) version of the personal starter kit. Although the local version works perfectly I'm running into a problem with the live/hosted
I launch the site in a browser and log in with admin privledges. When I click on either "Manage", "Add New Blog Entry", or any "Edit" buttton I get the same following error message:
Line 34: </pages>
Line 35: <httpHandlers>
Line 36: <add type="PeterKellner.Utils.CaptchaTypeHandler" verb="GET" path="CaptchaType.ashx"/>
Line 37: </httpHandlers>
Line 34: </pages>
Source File: E:\web\cornetocom0\htdocs\web.config Line:
Has anyone run into this or have an idea what might be causing this? Again, everything works locally, just not hosted.
Nov 27, 2007 11:57 PM|Careed|LINK
Nov 28, 2007 12:24 AM|tcorneto|LINK
I really appreciate your answer but I'm Mr asp.net newbie here. Can you expand a little more to your solution to this problem?
Thanks so much.
Nov 28, 2007 07:41 AM|Careed|LINK
When you add a handler type to your web.config, the associated DLL/assembly is either in your bin subdirectory or in the Global Assembly Cache (GAC). I suspect that this is probably in your bin subdirectory locally. So, the first question is: Where is
it on the server? If it's not in the bin subfolder, then put it there and it'll probably work.
Now, if it is in the bin subfolder or you know that it is in the GAC, i.e., someone else has already installed it for global use on the web server, then it is probably strong-typed and needs to be declared as such. To do so, you need to add to the type
attribute with your add element you listed the DLL assembly name, without the .dll, the version number, the culture, which is probably neutral, the public key token, which can be found if you have the assembly installed in the GAC.
Furthermore, as a ASP.NET newbie, you have probably been given this code and did as you were told to do with the DLL. In that case, you might look at whatever documentation you have and/or can find to see how you can properly run this feature.
For more information about working with the web.config file, look at the SDK documentation on the MSDN website.
Nov 28, 2007 02:49 PM|tcorneto|LINK
So this is the entry in my web.config:
I looked in the Bin folder on the server and saw this: CaptchaUltimateCustomControl.dll
So its there but stil doesn't work. Are you saying I need to modify what is contained within the httpHandlers above?
Thanks for your help!
Nov 30, 2007 01:10 AM|Careed|LINK
You could try adding this DLL to the GAC on your remote machine. Then you will need to change the type attribute to:
type="PeterKellner.Utils.CaptchaTypeHandler, CaptchaUltimateCustomControl.dll, Version=?.?.?.?, Culture=neutral, PublicKeyToken=<whatever is listed in the .NET Framework Configuration tool>"
Nov 30, 2007 10:44 AM|tcorneto|LINK
How do you add the DLL to the GAC?
Nov 30, 2007 03:11 PM|Careed|LINK
Open the Administrative Tools in the Control Panel. Open the Microsoft .NET Framework 2.0 Configuration and click on Manage the Assembly Cache and then on View List of Assemblies in the Assembly Cache. In the tree view on the left, right-click Assembly
Cache and select Add... A dialog will open for you to locate the DLL to be added. Once found, click on Open and the assembly should be installed.
Nov 30, 2007 05:28 PM|tcorneto|LINK
Are you referring to the DASP control panel? I'm sorry but I must be blind. I don't see "Microsoft .NET Framework 2.0 Configuration"
Nov 30, 2007 07:56 PM|tcorneto|LINK
Now I undertand that you meant the control panel on my local machine. My bad, sorry. Ok so I did what you said and after clicking open on the assembly I get the following error message:
"Unable to add the selected assembly. The assembly must have a strong name (name, version and public key)."
What I don't understand is why would adding this locally correct the issues that I'm having when I try to upload and run this on DASP. It works fine locally. Does it build this assembly reference into the solution when you compile it?
I did notice that CaptchaUltimateCustomControl.dll is NOT in the Assembly Cache.
Nov 30, 2007 08:13 PM|tcorneto|LINK
Been talking to DASP back and forth... this is the response to this topic I just got:
"We have determined that this is not a problem with our server. There is no server setting that we can change to fix this error.
It might work on our development machine and not on our servers because it isn't installed the same way. The DLL is not installed in the GAC, so you'll have to take that into consideration. It is likely that your web.config is not loading the assembly, which
is a coding issue. "
Dec 03, 2007 08:07 PM|tcorneto|LINK
This issue has been stressin me out for over a week.
Ok if you get the following error:
Parser Error Message: Could not load type 'PeterKellner.Utils.CaptchaTypeHandler'.
Line 41: </pages>
Line 42: <httpHandlers>
Line 43: <add type="PeterKellner.Utils.CaptchaTypeHandler" verb="GET" path="CaptchaType.ashx"/>
Line 44: </httpHandlers>
Log in to your DASP Control Panel then open then go to your Web Application tool.
Make sure that nothing is selected as a web application. Your root is an application by default and thats all you need.
No more errors. Enjoy!
Apr 11, 2008 08:02 AM|Meikel71|LINK
I got the same problem with the CaptchaTypeHandler.
Can your explain a little mor how you solved this problem. And WTF is that "DASP Control Panel"????
Apr 14, 2008 02:59 AM|tcorneto|LINK
The DASP Control Panel refers to the company that hosts my site
www.discountasp.net I was referring to their control panel.