...

View Full Version : Web controls cannot be rendered.



cube27
01-02-2007, 09:04 PM
I have created a web form that on click command sends registration data to a SQL server and partial information via server.transfer and string query to another page. That page has a PayPal button that utilizes a string query. Everything works like a champ on my local machine, but when I upload to a web server (with ASP ver2) None of my web controls can be rendered! Being so close to finish is driving me crazy! As a noob there must be something I am overlooking! All help is appreciated.

nikkiH
01-02-2007, 10:28 PM
What is the exact error message displayed?
My guess is that the site is configured to be 2.0 but your assemblies point to 1.1. What version is on localhost?

cube27
01-03-2007, 02:04 AM
It is a runtime error, I am at home right now so I cannot remember the message while running. While trying to display in Frontpage, for every web control it gives the dreaded "There was an error rendering the control. RegisterForEvent Validation can only be called during Render()".
The funny thing is, yes, this document was created in ASP.Net Web matrix which I think is 1.1, but I had started a form a few weeks previous in Visual Web Developer 2005 which is 2.0. Both, when uploaded to the site gave the same rendering error (in Frontpage). I have both (1.1 & 2.0) on localhost. I was under the impression both could coexist. Would both assemblies point to 1.1? Thanks again.

cube27
01-03-2007, 01:14 PM
Actually I have .Net 1.0.3705, 1.1 and 2.0 on this machine.

nikkiH
01-03-2007, 02:06 PM
So which is giving the error, the web server, or Frontpage?
Frontpage runs on your machine. If it is giving you render errors, the issue is with the IDE configuration (or it just sucks, which is my general opinion of it, to be honest).
If the web server is throwing the error, that's a whole 'nother ball of yarn. :D

cube27
01-03-2007, 02:47 PM
Sorry, the error message is when attempting to view the page on the web server. It is a configuration error, "Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS" Googling this error, I have determined the following : 1. The application was created in wwwroot folder. 2. Viewing the project folder it was not configured as application folder. This has since been rectified.
The Frontpage is used as management front end on the web server. It is while attempting to view this application within Frontpage that it cannot render the web controls. I hope I haven't confused things further. Again, this works without a hitch on my local host. Thanks again.

cube27
01-03-2007, 03:29 PM
I thought I discovered the problem being that my web folder on the server was not a virtual directory in IIS. But that since has been corrected and I still have the problem.

nikkiH
01-03-2007, 04:14 PM
Do you have any web.config files in any subfolders?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/d741a3a6fab21bc1/dccefe5aa5d9c83a?lnk=st&q=allowDefinition%3D%27MachineToApplication%27&rnum=1#dccefe5aa5d9c83a

Is your virtual directory configured as the application root?
http://groups.google.com/group/microsoft.public.inetserver.iis/browse_thread/thread/f0151142f7ebdfec/b973bb85674343aa?lnk=st&q=allowDefinition%3D%27MachineToApplication%27&rnum=4#b973bb85674343aa

Other possibly useful threads:
http://groups.google.com/group/microsoft.public.inetserver.iis/browse_thread/thread/f0151142f7ebdfec/b973bb85674343aa?lnk=st&q=allowDefinition%3D%27MachineToApplication%27+frontpage&rnum=2#b973bb85674343aa
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/a2bad28fc8da71c9/1605c8188e7522f6?lnk=st&q=allowDefinition%3D%27MachineToApplication%27+frontpage&rnum=11#1605c8188e7522f6



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum