Visual studio 2013 view project in browser gives internal server error

Alvin Bakker

I am new with Visual studio 2013 and I am currently working on two projects started by another developer. With one project the view option works fine using IIS Express, but the second one gives me error 500 with the below details...

"HTTP Error 500.19 - Internal Server Error. The requested page cannot be accessed because the related configuration data for the page is invalid."

"Config Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'Access-Control-Allow-Origin'"

Config Source:
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />

Hope somebody knows about an error like this and how I can solve it. Thanx in advance

Wyatt Barnett

I suspect IIS is already sending an Access-Control-Allow-Headers by default and that is blowing up.

Typically when setting custom headers one usually does a prophalactic removal first:

<customHeaders>
<remove name="Access-Control-Allow-Origin" />
<remove name="Access-Control-Allow-Headers" />
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaers>

This insures your app works no matter what happened upstream in configuration.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL Server Project in Visual Studio 2013

From Java

Visual Studio 2013: Database Project MSBuild error

From Dev

Is it possible to view output of visual studio cordova project as a web app in browser?

From Dev

Is it possible to view output of visual studio cordova project as a web app in browser?

From Dev

Visual Studio 2013 SQL Server database project build failure

From Dev

Visual Studio 2013: Error when creating new web project

From Dev

Project dll error in Visual Studio 2013 output upon Build

From Dev

Build SQL Server Data Tools (for Visual Studio 2013) project on build server without Visual Studio

From Dev

Browser Switch Plugin for Visual Studio 2013 +NuGet

From Dev

Browser Switch Plugin for Visual Studio 2013 +NuGet

From Dev

C++: Type casting operator overloading - Visual studio 2013 internal error

From Dev

Visual Studio 2013 Sign in error

From Dev

Visual Studio 2013 Scaffolding Error

From Dev

Cmake Visual Studio 2013 error

From Dev

Visual Studio 2013 Sign in error

From Dev

CURL gives 500 Internal server error

From Dev

Creating symlink gives 500 Internal Server Error

From Dev

.htaccess file gives 500 internal server error

From Dev

WAMP .htaccess gives Internal Server Error

From Dev

WWW POST gives me Internal Server Error

From Dev

Creating symlink gives 500 Internal Server Error

From Dev

Send httpcontent with PostAsync gives Internal Server Error

From Dev

Subdomain in Symfony gives Internal Server Error

From Dev

Implement jQuery Plugin in Visual Studio 2013 Project

From Dev

Build a Visual Studio 2013 project in pure C

From Java

Enable WiX project in Visual Studio 2013

From Dev

Cloning a GitHub project into Visual Studio 2013

From Dev

Xamarin iOS project in Visual Studio 2013 Premium

From Dev

Database project deploy fails in Visual Studio 2013

Related Related

  1. 1

    SQL Server Project in Visual Studio 2013

  2. 2

    Visual Studio 2013: Database Project MSBuild error

  3. 3

    Is it possible to view output of visual studio cordova project as a web app in browser?

  4. 4

    Is it possible to view output of visual studio cordova project as a web app in browser?

  5. 5

    Visual Studio 2013 SQL Server database project build failure

  6. 6

    Visual Studio 2013: Error when creating new web project

  7. 7

    Project dll error in Visual Studio 2013 output upon Build

  8. 8

    Build SQL Server Data Tools (for Visual Studio 2013) project on build server without Visual Studio

  9. 9

    Browser Switch Plugin for Visual Studio 2013 +NuGet

  10. 10

    Browser Switch Plugin for Visual Studio 2013 +NuGet

  11. 11

    C++: Type casting operator overloading - Visual studio 2013 internal error

  12. 12

    Visual Studio 2013 Sign in error

  13. 13

    Visual Studio 2013 Scaffolding Error

  14. 14

    Cmake Visual Studio 2013 error

  15. 15

    Visual Studio 2013 Sign in error

  16. 16

    CURL gives 500 Internal server error

  17. 17

    Creating symlink gives 500 Internal Server Error

  18. 18

    .htaccess file gives 500 internal server error

  19. 19

    WAMP .htaccess gives Internal Server Error

  20. 20

    WWW POST gives me Internal Server Error

  21. 21

    Creating symlink gives 500 Internal Server Error

  22. 22

    Send httpcontent with PostAsync gives Internal Server Error

  23. 23

    Subdomain in Symfony gives Internal Server Error

  24. 24

    Implement jQuery Plugin in Visual Studio 2013 Project

  25. 25

    Build a Visual Studio 2013 project in pure C

  26. 26

    Enable WiX project in Visual Studio 2013

  27. 27

    Cloning a GitHub project into Visual Studio 2013

  28. 28

    Xamarin iOS project in Visual Studio 2013 Premium

  29. 29

    Database project deploy fails in Visual Studio 2013

HotTag

Archive