asp.net-4.0

what's the right way to bind sqldatasource to asp:label in asp.net 4.0?

Is it possible using Eval? If so, can someone post a short fragment to illustrate? My SqlDataSource returns 1 record with 3 fields, I'd like to Format these into a string. eg: Record Field 'Name' = 'Jack' Field 'Amount' = 100 Field 'Date' = 12.02.2010 asp:Label text should end up being: Welcome Jack, last payment was 100 on 12.0...

How to add users in IIS Manager for an ASP.NET 4.0 application?

I have installed an ASP.NET 4.0 Web forms application in IIS 7.5. If I set the application pool to DefaultAppPool (.NET Framework 2.0) I get the icons for Providers, .NET-Roles and .NET-Users displayed on the configuration page for the application in IIS Manager and I can manage users and roles within IIS. (I'm using Forms authentication...

Does Security Trimming work with Web Forms Routing?

In my web.config I have configured a SiteMapProvider with securityTrimmingEnabled="true" and on my main master page is an asp:Menu control bound to an asp:SiteMapDataSource. In addition I have configured restricted access to all pages in a subfolder "Admin" (using another web.config in this subfolder). If I put a sitemapNode in Web.site...

Migrated to ASP.NET 4.0 on IIS 7 and can not get custom errors to work

I have an ASP.NET Web Application project that used to target ASP.NET 2.0. I installed ASP.NET 4.0 on the web server hosting the web application and changed the web application project to target .NET 4.0. Everything works ok with on exception: Custom Error Handling Before migrating to .NET 4.0, custom errors used to work. In my appli...

asp.net mvc with .net 4.0

Ok... I am currently upgrading a project from asp.net 3.5 using asp.net mvc 2.0. Im having a number of issues regarding namespace conflicts and other such lovely stuff. I was hoping someone could shed some light on a few things... The system.web.routing 4.0 and system.web.abstractions 4.0 libraries are empty, what's the motivation h...

The most reliable way to schedule a job in ASP.Net 4

We need a practical way (not just in theory) to start a job in asp.net in a given time or in intervals. the job could be to run web service, a certain function or executing a page. is there any new approach in ASP.Net 4 to do this? or is there any reliable way other than using windows schedule tasks? ...

How to get password html helper to render password on failed validation

I have a form for creating a new account and it has a password field in it. I'm using view models to pass data to the controller action and back to the form view. When the user enters their details in, and clicks submit, if validation fails and it returns them to the same view passing back in the view model, it won't default the password...

ASP.NET Membership API not working on Win2008 server/IIS7

I have a very odd problem. I have a web app that uses the .NET Membership API to provide login functionality. This works fine on my local dev machine, using WebDev 4.0 server. I'm using .NET 4.0 with some URL Rewriting, but not on the pages where login is required. I have a Windows Server 2008 with IIS7 However, the Membership API se...

MVC 1.0, .Net 4.0, and Expression Blend 4

I am trying to open a MVC 1.0 project compiled with the .net 4.0 framework in Expression 4. The solution opens fine, but there is no intellisense and when I run it, it shows an html browse page with the files listed. Any ideas on how to get Expression 4 to play nice with MVC? Thanks ...

Can I run ASP.NET 4.0 on Windows XP IIS6?

Can I run ASP.NET 4.0 websites on Windows XP II6 or do I need Windows 7 with II7 in order to run it? ...

ASP.NET Cache Class - Are there differences between ASP.NET 3.5 and ASP.NET 4.0?

Are there any major differences between the ASP.NET Cache Class from ASP.NET 3.5 to 4.0? ...

What is the correct setting of ClientIDMode in ASP.Net 4 to get ASP.Net 2.0 rendering.

We have just updated our application from ASP.Net 2.0 to ASP.Net 4.0. We have included in the web.config in the system.web element: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /> My understanding is that this is supposed to render the controls the same as .Net 2.0/3.5 would. However... its not... here is ...

"potentially dangerous Request.Form value ..." -- mvc 2, .net 4.0

Hi -- I am trying to set up input validation using regular expressions, but I keep getting this error when I enter "<test>" in a textbox: A potentially dangerous Request.Form value was detected from the client I have this in the web.config: <system.web> <httpRuntime requestValidationMode="2.0" /> I also have this in the web.con...

showing errors from actions in table-based views

I have a view where I want to perform different actions on the items in each row in a table, similar to this (in, say, ~/Views/Thing/Manage.aspx): <table> <% foreach (thing in Model) { %> <tr> <td><%: thing.x %></td> <td> <% using (Html.BeginForm("SetEnabled", "Thing")) { %> <%: Html.Hidden("x", thin...

Windows Authentication results in 404 live

I have an asp.net mcv site I'm trying to build, and integrate windows authentication for domain user groups. I have Authentication mode = windows on, and have messed with several other settings and switches both in the website and the iis manager, but all result in the same thing. Everything works in testing on the localhost, pages dis...

.NET 4.0 Forms Authentication change?

I'm seeing some new behavior in Forms Authentication after upgrading to .NET 4.0. This occurs only on IIS 6, not on 7. Background - In web.config, we configure Forms Authentication, and then use <authorization> tags to globally deny anonymous/unauthenticated users access. Then we explicitly allow access to a login.aspx page using a <lo...

ASP.NET 4.0 routing + ajax + browser history

The problem with ASP.NET 4.0 routing is that the Page.RouteData.Values does not contain the paramenters after # character from the link System.Web.Routing.RouteTable.Routes.MapPageRoute("ProjectViewRoute1", "project/{title}/{idProject}#{idDesign}", "~/ProjectView.aspx"); As I said, the Page.RouteData.Values.ContainsKey("idDesign") w...

ASP.NET 4.0 Rendering problems with the menu control after removing of controlRenderingCompatibilityVersion="3.5"

I am actually migrating websites to ASP.NET 4.0, having problems with the new rendering of menu controls. My websites make heavy use of nested menus. Hover effects are used and the layout is defined by a combination of themes and skins with linked CSS. If I remove the pages controlRenderingCompatibilityVersion attribute, they are no lon...

ValidateRequest=“false” and .NET 4 problem

.NET 4 broke ValidateRequest=“false” for some reason. The solution is -- just put <httpRuntime requestValidationMode="2.0" /> into your web.config file. The problem with that solution is that it breaks support for .NET 2.0! IIS refuses to accept unknown attributes in web.config. Also I don't like the all or nothing nature of thi...

Will .net 4.0 runtime work with SQL Server 2000?

According to this article, Visual Studio 2010 no longer supports SQL Server 2000. However, it's a bit less clear on whether the runtime (and things like ASP.net 4.0, Linq2SQL and EF) will work with it. It seems that only the design-time features require SQL Server 2005 or greater according to that article. I have a project that requir...