Unable to see value in Watch. Message: "Cannot evaluate expression because the code of the current m

A

Ajit Goel

Hi;

My project file property is set to use "Visual Studio Development
Server". I am able to debug and see the corresponding values when I
mouseover but as soon as I change to the project file property to use
"IIS web server", I am unable to see the mouseover value.When I add a
watch, I get the following error "Cannot evaluate expression because the
code of the current method is optimized". I am sure its something I am
not doing right but I can't pinpoint it.

One of the lines where I see this problem is
ViewState["PreviousPageAbsolutePath"] =
Request.UrlReferrer.AbsolutePath.ToString();

Following are some of the things that I have tried:
a. having a project reference instead of a dll reference.
b. changing the configuration settings of all the projects to the debug
mode.
c. Tools=> Options=> Debugging=> General=> Check the box for "Suppress
JIT optimization on module load.

For your reference I am using Visual Studio 2005 and IIS 6.0.

What could I be doing wrong?? Many thanks for all your help and
comments.

Kind Regards;

Ajit Goel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top