[Mono-aspnet-list] Null reference error when I try to access to ViewData dictionary

morf ismel at gecpri.co.cu
Fri Feb 15 14:56:37 UTC 2013

I  configure my Apache 2 in Ubuntu 12.04 with the below code. 

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot /home/ismel/MonoProject/emptyANMvcP/emptyANMvcP
	<Directory />
		Options FollowSymLinks
	MonoServerPath default /usr/bin/mod-mono-server4
	MonoDebug default true
	MonoApplications default
	<Location />
		Allow from all
		Order allow,deny
		MonoSetServerAlias default
		SetHandler mono


MVC work but when I try to access, for example, to a ViewData["myobjec"]
dictionary, where ViewData["myobjet"] = new MyObjet(), or even,
ViewData["myobjet"] = "littlestring" , server don't let me access and send
me a page with a null reference error. It sound like the relation between
Controller and View don't work well.

I think that the Controller did not put data in the ViewData dictionary.

I need help to solve this error. Help me 

View this message in context: http://mono.1490590.n4.nabble.com/Null-reference-error-when-I-try-to-access-to-ViewData-dictionary-tp4658597.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list