asp.net-4.0

ASP .Net: Authorization issue

Guys, I am having some trouble when I use ASP .Net 4's URL Routing feature while Authorization rules configured. Global.asax void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); } private void RegisterRoutes(RouteCollection routes) { routes.MapPageRoute("dashboard", "", "~/Restricted/Default...

Sub-folder web.config namespaces remove broken in 4.0?

Similar to this question I am porting a web application to 4.0. It has a root web.config that adds a namespace: <namespaces> <add namespace="Insignia.Catalog2"/> ... </namespaces> There is a sub-folder to this app with its own web.config: <namespaces> <remove namespace="Insignia.Catalog2"/> <add namespace="Insi...

AjaxToolkit IIS7 Asp.Net 4.0: Sys is not defined; handler mapping issue?

Hello everybody, I have moved my asp.net 3.5 app to asp.net 4.0 and moved from windows 2003 (iis6) to windows 2008 r2 (iis7.5) and now i have this sys is undefined error. i have the app running in an integrated application pool. everything works except my ajaxtoolkit 3.0.20820.0 dll now I have read several blog posts, most of them cov...

ASP.NET HyperLink instead of LinkButton - how to avoid border around image??

I have an ASP.NET web site which contains some ImageButton controls that cause postbacks used to filter a list of products to certain groups of products. The ImageButton was created something like this: ImageButton _myImageButton = new ImageButton(); _myImageButton.ImageUrl = PicturePath + PictureName; _myImageButton.Attributes.Add("bo...

Losing my session variables - What exception might cause sessions to be lost?

Hello, I have health monitoring enabled on a production system (asp.net webforms .net 4) and I see that there's a lot of errors being sent to me indicating that a session variable has been lost. (I am trying to attach something out of session state to a entity framework data context and get a "Value cannot be null, parameter name entit...

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 problem. My site should not be some how attempting to degrade itself to accommodate the defun...

Why isn't "renderAllHiddenFieldsAtTopOfForm" not working?

In a .NET 4 web application I've set the property "renderAllHiddenFieldsAtTopOfForm" to "false" in the web.config. Unfortunately the hidden fields are still at the top. Why is this? Does some other setting override it? "pages" property in web.config: Screenshot of top of the form: ide it? ...

asp.net web application can't connect to webservice anymore- fails with an error.

hi, I have an asp.net web app which i recently upgraded to .net 4.0 framework and published. Part of the web application functionality is to connect to another service when user submits info. I get the following error: A connection attempt failed because the connected party did not properly respond after a period of time, or establis...

maxRequestPathLength not in ASP.NET 4 documentation and doesn't work

If I try to use the new maxRequestPathLength settings in an ASP.NET application it does not work. I get an unrecognized attribute error. I've tried using both ASP.NET Integrated and Classic application pools in IIS 7. What is also funny is that if you search for maxRequestPathLength on MSDN it is no where to be found in the documentat...

NANT, Cruise Control and ASP.net 4.0

Does anyone know of a good resource for basic samples for both a NANT.Build file and a CCNet.Config file entry for nightly build on an ASP.net 4.0 application, having had a good look around online it appears that there's a lot of conjecture on how this should be done, but I'm looking for something sustainable. I have projects that use ....

ASP.NET 4.0 Deployment package include

The build Deployment package feature of Visual Studio 2010 doesn't copy the App_GlobalResources directory from my ASP.NET 4.0 WebForms application. I know I can use for example "ExcludeFoldersFromDeployment" to exclude folders from the deployment, but how can I include this folder with MSBUILD? ...

favicon not working in any browser

Hey, I am trying to get a favicon to appear on my webpage. Disclaimer: I have never done this before, but it does seem rather simple. I have a ico image in a folder called pics that is part of my project. I am trying to do this inside my master page. <link rel="Shortcut Icon" href="~/pics/REDIcon.ico"/> That is correct, right? Is th...

ASP.NET 4 UpdatePanel breaking change

I am porting an ASP.NET application from 3.5SP1 to 4.0. The application works perfectly in 3.5SP1. In 4.0, I am seeing a difference in UpdatePanel behavior. We have a simple user control with a testbox, a button, and some text. The user control lives inside an UpdatePanel with UpdateMode="Conditional" and ChildAsTriggers="true". Users ...

Different .Net assemblies hosted in ASP.Net 4

I have a web application (A) developed in .NET4 which references Ingrian - a third party assembly developed in .NET2 possibly with native code. This Web application is hosted on IIS7 using .NET4 runtime. The problem is, sometimes this assembly does not get loaded (if you recycle the application pool), until you force IIS to reload the ...

Get binary from uploaded file (image) in ASP.NET MVC

I'm using the following code: <form action="" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <input type="submit" /> </form> And... [HttpPost] public ActionResult Index(HttpPostedFileBase file) { if (file.ContentLength > 0) { var fileName = P...

Problems with unit testing in asp.net mvc ?

UPDATE: SO I am getting the error whenever I have all meta tags like HostType,AspNetDevelopmentServerHost,URLToTest. So when I comment these tags I can run the test but I need to have these tags to have the connection string available for controller to connect to database. I created a basic unit test by just right clicking on the action ...

Is ASP.NET with .NET 4 faster

I'm looking to upgrade my ASP.NET web app to the .NET 4 framework. Would I see performance improvements right away? ...

Is it possible to override the relative path ~/ throughout my web application?

Back Story I am currently updating an existing web application to support a multi-tenant environment. Today we current host an application on http://www.example.com/MyApp, but now we must be able to support multiple clients on the same web application. So each client should be able to access the application through urls like: http://...

Implementing DotNetOpenid in my asp.net website

I am trying to implement DotNetOpenid in my asp.net website. However, the more I try to read up on DotNetOpenid, the more confused I get. My initial goal is to allow user login process (similar to StackOverflow). I attempted to get some help via this question http://stackoverflow.com/questions/3882248/dotnetopenid-tutorial/3895442#389...

Split up default.aspx

Hi, I have dynamic page which hides and shows a lot of stuff, div's, depending of what the user is clicking. It works great however the default.aspx gets a bit messy with all that html so I wounder if it is possible to split up the html into smaller parts and still keeping the structure of the page? Thanks M ...