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
11
votes
4 answers

ASP.NET MVC - Uploading an image to Amazon S3

I have my image from Request.Files[0]. Now, how do I upload this image to S3? I see that in the AWS .NET API you have to specify ContentBody when putting an object which is a string. How would I get the content body of my file?
Matthew H
  • 5,831
  • 8
  • 47
  • 82
11
votes
3 answers

Can we use Razor on an existing ASP.NET 4 website?

Is it possible to use Razor on an existing ASP.NET 4 website?
Amitabh
  • 59,111
  • 42
  • 110
  • 159
11
votes
7 answers

ASP.net 4.0 default.aspx problem on IIS6

I installed .net framework 4 on my windows 2003 enterprise x64, wrote simple asp.net 4.0 application (default.aspx page only). The application works great if request is to default.aspx, not to the root site: contoso.com/ - doesn't work (Get 404…
Dimonina
  • 111
  • 1
  • 1
  • 5
11
votes
6 answers

.Net 4.0 is encoding single quote when using Attributes.Add

.Net 4.0 is encoding single quotes when I am using Attributes.Add to add client side events to my asp.net objects. In the previous versions this didn't happen. for example :
Hassan Mokdad
  • 5,832
  • 18
  • 55
  • 90
11
votes
3 answers

C# : Custom implicit cast operator failing

Alright, I've been trying to find any information on this for a while. I built a small class to see how hard type-safe-enums are to implement for strings, because I want to use them for database field-names and such. I've never liked the fact that…
FireSBurnsmuP
  • 923
  • 10
  • 28
11
votes
2 answers

Difference between <%: %> and <%#: %> in Asp.Net

I know that we can <%: %> syntax for html encoding that is introduced in .Net 4. But I was reading new features of Asp.Net 4.5, and I got that we have another type i-e <%#: %> that is used for encoding the result of databind expression. I am confuse…
Idrees Khan
  • 7,702
  • 18
  • 63
  • 111
10
votes
3 answers

What's the point of the Web.config's system.web/Pages/Namespaces Tag?

Regardless of whether my machines's root web config (the one in Windows/Microsoft.NET/...) contains system.web/pages/namespaces/add elements, it still is demanded that I include using statements atop each aspx.cs CodeBehind file. Why? Shouldn't it…
JonathanWolfson
  • 861
  • 4
  • 20
  • 30
10
votes
3 answers

ASPX auth cookie expiration time is always 30 minutes

I have set the the cookie expiration time to 1 month but when I look the expiration timeout of .ASPXAUTH cookie in browser it says 30 minutes ahead from now. var ticket = new FormsAuthenticationTicket(1, "myname", DateTime.Now, …
Rocky Singh
  • 15,128
  • 29
  • 99
  • 146
10
votes
5 answers

Options for real-time web notifications and updates using Comet/XMPP vs WebSocket technologies on a Microsoft stack?

I am scoping out the architectural options for a project that will render live updates (like Facebook) of user activities - logins, photos, etc. Two main UI components of this are an auto-updating scrolling area where new notifications will be…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
10
votes
2 answers

IIS7 Web.Config Caching - what are the differences here, and how does it all come together?

In IIS7 I've got the ability to set caching options. These options are added to my web.config as such...
Chase Florell
  • 46,378
  • 57
  • 186
  • 376
10
votes
2 answers

Is it possible to disable the browserCaps functionality in ASP.NET?

Is it possible to disable the browserCaps functionality in ASP.NET? I wish my site to be served reliably and exactly as I have it defined to all browsers regardless of their capabilities. If their browser can't support the site, that's their…
Chris Marisic
  • 32,487
  • 24
  • 164
  • 258
10
votes
1 answer

IIS 7.5 ASP.NET-4 Gzip compression

I just can't seem to get GZIP compression enabled for my ASP.NET 4 application. Only javascript files seem to get compressed. The page, css and others dont get compressed. The response header of a not compressed CSS file is: Content-Type …
joop
  • 321
  • 3
  • 8
10
votes
2 answers

ASP.NET-4 IIS7.5 web.config serverRuntime element

Whenever I add this line to my web.config in the system.webServer section: With our without properties, IIS 7.5 just serves up a blank page instead of the website. I created a new empty Web Application using IIS and added the line…
joop
  • 321
  • 3
  • 8
10
votes
3 answers

Problem with config group when upgrading to .NET 4.0

So we've upgraded our site from 3.5 SP1 -> .NET 4. When we ran the site, we got an Internal Server Error (500), stating the following configuration group could not be read:
RPM1984
  • 72,246
  • 58
  • 225
  • 350
10
votes
3 answers

Which is the recommended way to fill all controls on a Web Form when user selects a record?

I have a GridView control which shows a list of all employees. When user selects any employee from this list, the record is shown on a Web Form with all input controls pre-filled with the values. I want to know any good approach to do this. Should I…
RKh
  • 13,818
  • 46
  • 152
  • 265