Questions tagged [asp.net-4.0]

This tag refers to the version 4.0 of the ASP.NET web application framework introduced with the .NET Framework 4.

Refers to the version 4.0 of the ASP.NET web application framework introduced with the .NET Framework 4.

1371 questions
545
votes
19 answers

How to fix: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

I am configuring an MVC 3 project to work on a local install of IIS and came across the following 500 error: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list. It turns out that this is because…
hspain
  • 17,528
  • 5
  • 19
  • 31
160
votes
6 answers

ValidateRequest="false" doesn't work in Asp.Net 4

I have a form at which I use ckeditor. This form worked fine at Asp.Net 2.0 and 3.5 but now it doesn't work in Asp.Net 4+. I have ValidateRequest="false" directive. Any suggestions?
HasanG
  • 12,734
  • 29
  • 100
  • 154
102
votes
20 answers

The type is defined in an assembly that is not referenced, how to find the cause?

I know the error message is common and there are plenty of questions on SO about this error, but no solutions have helped me so far, so I decided to ask the question. Difference to most of similar questions is me using App_Code directory. Error…
afaf12
  • 5,163
  • 9
  • 35
  • 58
66
votes
18 answers

Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0

I just upgraded packages in an MVC 3 project (ASP.net 4), and now I am getting the following error message when accessing a page in that project: Server Error in '/MyApplication' Application. Could not load file or assembly…
Jean-François Beauchamp
  • 5,485
  • 8
  • 43
  • 77
61
votes
7 answers

Check if Cookie Exists

From a quick search on Stack Overflow I saw people suggesting the following way of checking if a cookie exists: HttpContext.Current.Response.Cookies["cookie_name"] != null or (inside a Page class): this.Response.Cookies["cookie_name"] !=…
Acidic
  • 6,154
  • 12
  • 46
  • 80
56
votes
9 answers

ASP.net Getting the error "Access to the path is denied." while trying to upload files to my Windows Server 2008 R2 Web server

I have an asp.net webapplication that uploads files to a specific folder on the Web server. locally everything works fine, but when I deploy the application to the Webserver, I begin getting the error "Access to the path "D:\Attachments\myfile.doc"…
Hassan Mokdad
  • 5,832
  • 18
  • 55
  • 90
46
votes
1 answer

What is the correct usage of "runAllManagedModulesForAllRequests" in ASP.NET MVC2/3?

I've read various posts and questions about the use of runAllManagedModulesForAllRequests in the modules section of and I'm concerned that I'm using this setting incorrectly. All my ASP.NET MVC applications are written using .NET…
Kev
  • 118,037
  • 53
  • 300
  • 385
46
votes
10 answers

Font awesome inside asp button

This is my asp:button code which is not rendering font awesome's icon but instead shows the HTML as it is:
Jack
  • 7,433
  • 22
  • 63
  • 107
40
votes
6 answers

ASP.NET control to render a

The Label control in ASP.NET seems to render tags, but is there a server control to render HTML within a
? Sure, I could set display: block and it might look the same, but I'd rather not be nesting divs inside spans. Also I'd prefer not…
James
  • 7,343
  • 9
  • 46
  • 82
40
votes
4 answers

The directory '/website/App_Code/' is not allowed because the application is precompiled

How can I resolve the below issue that I get when I am running my precompiled web app? Server Error in '/CRM' Application. The directory '/CRM/App_Code/' is not allowed because the application is precompiled. Description: An unhandled…
shalsoft
  • 457
  • 1
  • 5
  • 13
35
votes
9 answers

HTTP Error 503. The service is unavailable under simple ASP.NET 4.0 web site

Something strange happened on my local laptop: my web site that worked locally for a long isn't launched... Trying to localize the problem I've created a simple web site with 'index.html' file only. It works fine under ASP.NET 2.0, but when I…
Budda
  • 18,015
  • 33
  • 124
  • 206
35
votes
24 answers

An attempt to attach an auto-named database for file ....database1.mdf failed

I am getting the following error while debugging my visual studio 2010 website: An attempt to attach an auto-named database for file C:\Users...\Desktop\Dpp2012New\App_Data\dppdatabase.mdf failed. A database with the same name exists, or specified…
rahulserver
  • 10,411
  • 24
  • 90
  • 164
34
votes
7 answers

Can I develop for .NET Framework 4 in Visual Studio 2008?

My ASP.NET application runs in IIS on my web server and uses Microsoft .NET Framework 4 Beta 2. (Its Application Pool is set to .NET Framework version .NET Framework v4.0.21006.) It gives this new error: A potentially dangerous Request.Form value…
Zack Peterson
  • 56,055
  • 78
  • 209
  • 280
33
votes
6 answers

Store String Array In appSettings?

I'd like to store a one dimensional string array as an entry in my appSettings. I can't simply separate elements with , or | because the elements themselves could contain those characters. I was thinking of storing the array as JSON then…
Greg
  • 8,574
  • 21
  • 67
  • 109
32
votes
6 answers

Getting 404.0 error for ASP.NET MVC 3 app on IIS 7.0 / Windows Server 2008

I am attempting to deploy an ASP.NET MVC 3 application to a Windows 2008 x64 server (running IIS 7.0 obviously), and IIS does not want to seem to serve up the content properly. All requests are resulting in a 404.0 error, because the requests are…
1
2 3
91 92