IE10 SCRIPT5009: ‘__doPostBack’ is undefined

There is apparently a bug in the browser definition files that shipped with .NET 2.0 and .NET 4. The definition files do not cater for IE10 as a browser version and hence defaults to a default definition which doesn’t support JavaScript. Scott Hanselman has a very detailed writeup about this issue here: http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx Scott proposes … Read more

Server Error in ‘/’ Application. ASP.NET

The key information in this error is this line: This error can be caused by a virtual directory not being configured as an application in IIS. In IIS, you can have several applications, but they must be configured as an application. Generally, when you create a web project it maps directly to an IIS application. … Read more

Capturing SOAP requests to an ASP.NET ASMX web service

You can also implement by placing the code in Global.asax.cs protected void Application_BeginRequest(object sender, EventArgs e) { // Create byte array to hold request bytes byte[] inputStream = new byte[HttpContext.Current.Request.ContentLength]; // Read entire request inputstream HttpContext.Current.Request.InputStream.Read(inputStream, 0, inputStream.Length); //Set stream back to beginning HttpContext.Current.Request.InputStream.Position = 0; //Get XML request string requestString = ASCIIEncoding.ASCII.GetString(inputStream); } I … Read more

App_Start Folder in ASP 4.5 only in WebApplications Projects?

There is nothing special about App_Start, it’s just a folder. What’s special is how it’s used, and that’s specific to the WebActivator framework, which is a NuGet package you can install. App_Start and WebActivator are not specific to .NET 4.5, but they do require .net 4 (which means VS 2010 or 2012) See http://blog.davidebbo.com/2011/02/appstart-folder-convention-for-nuget.html

Add ASP.NET Membership tables to my own existing database, or should I instead configure a separate ASP.NET membership database?

I personally just added the asp.net membership stuff to my own database. I then wrote a basic wrapper class around System.Web.Security.Membership class so that the code acts like its using its own membership stuff. Its pretty slick and not that hard to do. If you need assistance setting it up, here is what I did. … Read more

Separate config file for sections of web.config

You can certainly move your rewrite rules and mappings out to a separate file: Storing URL rewrite mappings in a separate file <system.webServer>   <rewrite>     <rewriteMaps configSource=”rewritemaps.config” />     <rules configSource=”rewriteRules.config” />   </rewrite> </system.webServer> In addition you can move quite a few configuration sections to their own files: <appSettings configSource=”appSettings.config” /> [Docs] <connectionStrings … Read more

How to set debug false for release mode

Web.config transformations as they are defined in the Web.Release.config are only done when deploying/publishing the project for the relevant configuration. Just changing the active configuration in Visual Studio to Release and running the application does not run the transformations. Therefore, the web.config remains unchanged. This behavior is reasonable by the way as a web application … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)