I'm trying to launch debugging on Visual Studio 2012 and it shows me this error message :

error message

By googling a little bit, I read that I should remove the 10 directory located in :


What I did, but I got no results. According to This article, I rather should remove the 'DefaultView.SEView' file that can be found in :

C:\Users\username\AppData\Roaming\Microsoft\Visual Studio\10.0\ServerExplorer

Very well, I deleted it. It's not working.

This article states that I should access :

Central admin > System settings > Configure alternate access mappings > Edit public URLs

Then, set the default URL with the one in Visual Studio. I did it and it shows me an 'Invalide URL' SharePoint error message. So, it didn't worked neither I guess...

Besides the fact that there are 3 completely different solutions for the same problem (which seems to be weird), does anyone have an other idea to fix this ? By the way my web.config file is perfectly normal. Thanks a lot.

5 Answers 5


I normally debug by attaching w3wp process.

If you try running solution from visual studio it tries to deploy solution on virtual IIS and load it from there. In case of SharePoint that will not work.

  • Thanks for you answer Amal. Attaching w3wp process is the first step. After that I use to click one "Run" and it were working perfectly. It tries to deploy the solution only if you haven't configure settings to prevent it to do it. Note: I was using the debugging tool at the begining of the project. For some reason, I came back the day after and then I started to get this message.
    – ameliapond
    Feb 2, 2016 at 12:13

I didn't found the solution but for dark reasons, it's working now. Howevever, I can tell that one of the procedures (or the combination of them), described in the body of my question, solved my issue. I think it's the part with the alternate access mapppings.

In the "alternate access mappings collection" drowpdown list in the page with the same name, I selected my web application and changes the "by default" url until it work.


Just experienced this on SP 2016, and the following link(S) provided the solution.

For quick reference, here's the key note: where deploying projects/solutions is fine, but trying to debug doesn’t work. You see an error alert with the text:

“Could not load the Web.config configuration file. Check the file for any malformed XML elements, and try again. The following error occurred: The given key was not present in the dictionary.”

Checking the Web.config shows no malformed XML at all. One thing to check into is the configuration of alternate access mappings in Central Administration. For debugging to work, the Site URL property of your SharePoint project must match the URL of the Default zone for your web application.



Make sure you are not deploying using Alternative URL


I had the same issue, I changed my debugging url to default in alternate access mapping, then it worked


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.