Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After copying an ASP.net MVC 3 application to another server I am getting the following error even though the IIS settings and web.config are identical to the previous site.

I think it must be a permissions issue but the files look like they have the correct permissions, any ideas?


Server Error in '/' Application.

Collection is read-only. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Collection is read-only.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NotSupportedException: Collection is read-only.] System.Collections.Specialized.NameValueCollection.Set(String name, String value) +6211002 System.Web.HttpHeaderCollection.SynchronizeHeader(String name, String value) +32 System.Web.HttpRequest.SynchronizeHeader(String name, String value) +44 System.Web.Hosting.IIS7WorkerRequest.GetHeaderChanges(HttpContext ctx, Boolean forRequest) +9170807 System.Web.Hosting.IIS7WorkerRequest.SynchronizeVariables(HttpContext context) +8748522 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +154


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

share|improve this question
You haven't provided enough information or any attempt at researching this problem on your own. Essentially it looks like your code is trying to make a change to the HTTP Response Object and that is not allowed. Are you moving from IIS 6 to IIS 7? There are differences between the two! – Brent Pabst Nov 5 '12 at 14:39

closed as not a real question by Adrian, Scott Pack, Ward, Brent Pabst, rnxrx Nov 5 '12 at 17:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Browse other questions tagged or ask your own question.