Peter
Peter

Reputation: 7804

VS2010 ASP.MVC breakpoints not being hit in multiple site solution

I am writing a Federated web solution it has multiple projects. Debugging has been working fine until yesterday when suddenly (I don't recall messing with anything critical) I got the 'breakpoint will not currently be hit. No symbols have been loaded for this document' message on my 3 ASP.MVC projects in the solution.

I trawled around the web and this site for advice and these are the things I have done.

After doing these things 2 of the 3 ASP.MVC projects are debugging properly, but the 3rd and critically the one I actually want to step through is not.

other info for you

Any help appreciated.

Upvotes: 0

Views: 804

Answers (2)

Peter
Peter

Reputation: 7804

I have worked out what the problem is.

While I had the initial problem of all projects not debugging the federation project turned out to be a special case. I have been away on leave and had forgotten that I had this in my web config

   <federatedAuthentication>    
   <!--
   <wsFederation passiveRedirectEnabled="false" issuer="https://localhost/FederationProvider/"
                  realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
   -->
   <wsFederation passiveRedirectEnabled="false" issuer="https://localhost/Issuer/"
                  realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
   <cookieHandler requireSsl="true" path="/Application/" />
   </federatedAuthentication>

When I changed it so I am using the federator rather than the issuer directly the debugger works.

   <federatedAuthentication>    

   <wsFederation passiveRedirectEnabled="false" issuer="https://localhost/FederationProvider/"
                  realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
   <!--
   <wsFederation passiveRedirectEnabled="false" issuer="https://localhost/Issuer/"
                  realm="https://localhost/Application/Home/FederationResult" requireHttps="true" />
   -->
   <cookieHandler requireSsl="true" path="/Application/" />
   </federatedAuthentication>

I feel pretty stupid for not realising this earlier. VS2010 was just being too smart.

Upvotes: 1

ChrisAnnODell
ChrisAnnODell

Reputation: 1350

This may be obvious, but it wasn't in your list of things you've done and in a state of panic can get forgotten, but have you checked the the Directory in IIS is the same as the one the code VS has loaded?

VS should recreate the site (depending on project settings), so try closing VS, deleting the site, reopening the project and letting VS recreate the IIS site for you.

Upvotes: 1

Related Questions