0

In my asp.net web application, one of my page, I am storing a list of objects(List<AgentDetails>) to ViewState. After that when I try to get it back as (List<AgentDetails>)ViewState["ViewStateAgentDetails"], i gets an error like

The type 'foo.Info.AgentDetails' exists in both 'foo.dll' and 'foo.dll'

I can't understand what is happening here. I got stuck with this issue. Could anybody help me out of this? Thanks in advance.

Arun
  • 182
  • 1
  • 2
  • 14

1 Answers1

0

If i interpret it correctly from answer to my comment, i can see that there might be some other DLL , that can have different dll name says bar.dll, but ultimately has same namespace and class name. So to fix this , find that second DLL, and use extern or change namespace to solve this error.

More explanation - http://blogs.msdn.com/b/abhinaba/archive/2005/11/30/498278.aspx

How do you allow two DLL's with same namespace.class to exist in the same application?

Community
  • 1
  • 1
Arindam Nayak
  • 7,346
  • 4
  • 32
  • 48