Wednesday, January 11, 2012

WCF error: metadata contains a reference that cannot be resolved

WCF error: metadata contains a reference that cannot be resolved

This is one of the very common error you get when you develop your first WCF and try to consume the same in your client application.

One of this silly error may take long time to resolve because the error description is totally meaning less and our mind will always force us to look through the code to find out the issue.

cause:
Cause of this error is simple when you try to refer the WCF service IIS tried to access C:\Windows\Temp folder. If ASP.NET or IIS_IUSER(based on the windows version) account doesn’t have access to this folder you will see this error.

Solution:
Add ASP.NET or IIS_USER account to this folder or give admin rights to the user account you are running your application.

6 comments:

Anonymous said...

Was exactly the wall I was hitting. Thank you.

Anonymous said...

Thank you. This pointed me in the right direction.

Anonymous said...

Thanks buddy.. You are right upto the point.

Unknown said...

Wow, after an hour of searching, you were the only one with that answer. THANK YOU!

Anonymous said...

I gave admin rights but problem still persists.
I am using microsoft visual studio 2010 and windows 7.
Please help!

Amey Naware said...

This is exactly was my problem. Thanks buddy for hitting the bulls eye ;)