what happens if you update your vs2008 to SP1?
I'm not sure, but I vaguely remember that some
changes may have been made in vs2008 SP1
to support ASP.NET MVC ~~ I'd try, in this order,
uninstalling ASP.NET MVC, upgrading vs2008 SP1,
reinstalling ASP.NET MVC ... also, if you have
any add-ins for vs2008, AFAIK, they should be
installed after ASP.NET MVC v1.0.
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
Marked as answer by nagir on Apr 28, 2009 12:25 AM
also, do you have multiple .dll's on your hard disk?
you may be referencing the wrong version ... others
have had problems relating to wrong version references.
e.g.: http://forums.asp.net/p/1411780/3097809.aspx
you can hunt them down, if you have them, from a command prompt;
examples:
dir c:\system.web.abstractions.dll /a/s dir c:\system.web.mvc.dll /a/s dir c:\system.web.routing.dll /a/s should help you locate every copy on your hard drive.
3.5.0.0 is what I have in c:\windows\assembly (a.k.a. "the GAC") for System.Web.Routing.
Regards,
Gerry (Lowry)
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
Yes. I have multiple assemblies on my disk but they are primarily included in samples.
I even tried to set Copy Local for all 3 assemblies so the web site should explicitly use the ones I reference, but still the same.
The exact versions I use are:
System.Web.Abstractions.dll - 3.5.0.0 (File version 3.5.30428.1), from GAC
System.Web.Routing.dll - 3.5.0.0 (File version 3.5.30428.1), from GAC
System.Web.Mvc.dll - 1.0.0.0 (File version 1.0.40310.0), from GAC
I'm now trying to install VS SP1 with no success. I'll try to download the ISO of the whole update.
I don't really understand how the VS can access route values (in the Quick Watch for example) and my code cannot (even if I write the code in Immediate window during debugging). Maybe that should give another clue for now?
Hi nagir, pesonally, I'd delete any sample assemblies that are part of the
final product so that after everything is installed, only the GAC
contents would apply ~~ it's much easier to keep things under
control if everything you require is only in the GAC. During the
previews, the local copies were required because they were not
initially in the GAC (because they were a work in progress). Now
those local copies are likely to cause you headaches.
(example: http://forums.asp.net/t/1412187.aspx).
Yes, too, I'd update to VS SP1 immediately ~~ it's been out for quite a while.
At http://forums.asp.net/t/1415432.aspx,
levib wrote, in part:
"If you want Visual Studio design-time support,
Visual Studio 2008 SP1 is required."
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
nagir
Member
162 Points
184 Posts
Null Reference Exception accessing route values
Apr 24, 2009 04:22 AM|LINK
Hi,
I have exactly the same problem as here: when I try to access route values it throws null reference exception from the inside the dictionary.
There must be some versioning problem but I cannot spot it.
My env:
My routing assembly has version 3.5.0.0 (I expect it to be 3.6?).
Any ideas how to fix this?
Thanks,
Dmitriy.
routing
gerrylowry
All-Star
20577 Points
5721 Posts
Re: Null Reference Exception accessing route values
Apr 24, 2009 08:29 AM|LINK
what happens if you update your vs2008 to SP1?
I'm not sure, but I vaguely remember that some
changes may have been made in vs2008 SP1
to support ASP.NET MVC ~~ I'd try, in this order,
uninstalling ASP.NET MVC, upgrading vs2008 SP1,
reinstalling ASP.NET MVC ... also, if you have
any add-ins for vs2008, AFAIK, they should be
installed after ASP.NET MVC v1.0.
gerrylowry
All-Star
20577 Points
5721 Posts
Re: Null Reference Exception accessing route values
Apr 24, 2009 08:44 AM|LINK
also, do you have multiple .dll's on your hard disk?
you may be referencing the wrong version ... others
have had problems relating to wrong version references.
e.g.: http://forums.asp.net/p/1411780/3097809.aspx
you can hunt them down, if you have them, from a command prompt;
examples:
dir c:\system.web.abstractions.dll /a/s
dir c:\system.web.mvc.dll /a/s
dir c:\system.web.routing.dll /a/s
should help you locate every copy on your hard drive.
3.5.0.0 is what I have in c:\windows\assembly (a.k.a. "the GAC") for System.Web.Routing.
Regards,
Gerry (Lowry)
nagir
Member
162 Points
184 Posts
Re: Null Reference Exception accessing route values
Apr 27, 2009 02:00 AM|LINK
Hi Gerry,
Thanks a lot for the reply.
Yes. I have multiple assemblies on my disk but they are primarily included in samples.
I even tried to set Copy Local for all 3 assemblies so the web site should explicitly use the ones I reference, but still the same.
The exact versions I use are:
- System.Web.Abstractions.dll - 3.5.0.0 (File version 3.5.30428.1), from GAC
- System.Web.Routing.dll - 3.5.0.0 (File version 3.5.30428.1), from GAC
- System.Web.Mvc.dll - 1.0.0.0 (File version 1.0.40310.0), from GAC
I'm now trying to install VS SP1 with no success. I'll try to download the ISO of the whole update.I don't really understand how the VS can access route values (in the Quick Watch for example) and my code cannot (even if I write the code in Immediate window during debugging). Maybe that should give another clue for now?
Cheers,
Dmitriy.
nagir
Member
162 Points
184 Posts
Re: Null Reference Exception accessing route values
Apr 27, 2009 02:28 AM|LINK
I've just found one weird thing.
There are 2 assemblies (in total, except ones in samples) System.Web.Routing.dll located in:
It looks like my project references the assembly from the Reference Assemblies folder but not from the GAC! How come?
Here's how the reference is defined in my .csproj file:
One more thing - I have uninstalled ASP.NET MVC so all the info above applies to case where there's no ASP.NET MVC at all.
I've installed the ASP.NET MVC and got the OLD 30428 version and Could not load type StopRoutingHandler error.
I probably have to download the VS SP1 update and install MVC after it.
Isn't it really weird?
Cheers.
gerrylowry
All-Star
20577 Points
5721 Posts
Re: Null Reference Exception accessing route values
Apr 27, 2009 12:36 PM|LINK
Hi nagir, pesonally, I'd delete any sample assemblies that are part of the
final product so that after everything is installed, only the GAC
contents would apply ~~ it's much easier to keep things under
control if everything you require is only in the GAC. During the
previews, the local copies were required because they were not
initially in the GAC (because they were a work in progress). Now
those local copies are likely to cause you headaches.
(example: http://forums.asp.net/t/1412187.aspx).
Yes, too, I'd update to VS SP1 immediately ~~ it's been out for quite a while.
At http://forums.asp.net/t/1415432.aspx, levib wrote, in part:
"If you want Visual Studio design-time support,
Visual Studio 2008 SP1 is required."
See the notes about gacutil (if you need to use it) at
http://forums.asp.net/p/1411780/3097809.aspx.
Regards,
Gerry (Lowry)
gacutil
nagir
Member
162 Points
184 Posts
Re: Null Reference Exception accessing route values
Apr 28, 2009 12:28 AM|LINK
Hi Gerry,
Thanks a lot for your help.
I've finally installed the SP1 and now everything works as expected. Huh.
I didn't even remove any of the assemblies (nor from GAC and C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5, nor from samples).
Getting back to work.
Cheers,
Dmitriy.