Adding NUnit to the options for ASP.NET MVC test framework

After a bunch of research and experimentation, I’ve found the answer. For the record, the current release of nUnit 2.5 Alpha does not seem to contain templates for test projects in Visual Studio 2008. I followed the directions here which describe how to create your own project templates and then add appropriate registry entries that … Read more

Connection problems with SQL Server in ASP.NET applications using out-of-process session state

Transport level errors are often linked to the connection to sql server being broken … usually network. Timeout Expired is usually thrown when a sql query takes too long to run. So I would troubleshoot the link to your Sql Server and then monitor to see what queries are timing out. Sounds like a SQL … Read more

Where cookies are stored in system?

IE and Windows keeps cookies here: %AppData%\Microsoft\Windows\Cookies Points to the same directory as @Sohnee’s does under Windows Visa and newer, but his doesn’t under Windows XP and earlier, my – does. also Temporary Internet Files can contain some cookies. Meanwhile Firefox keeps cookies into SQLite database under profile root: %AppData%\Mozilla\Firefox\Profiles\%FirefoxProfile%\cookies.sqlite To read the data you … Read more

What is a .pubxml.user file?

Because this is a user-specific file, it should be excluded from version control. From https://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx, emphasis mine. When you create a publish profile, two files are created in the PublishProfiles folder: .pubxml and .pubxml.user. The .pubxml.user file contains only a few settings that apply to a specific user, such as an encrypted password. By default … Read more

Anyone have ideas for solving the “n items remaining” problem on Internet Explorer?

IF you use behaviors ANYWHERE in your code (or a library you use uses them) e.g. <style> body * { behavior:url(anyfile.htc); } </style> Then there is NO solution that I’m aware of and the bug report filed in IE Feedback on Connect for IE8 (and IE7) was rejected for both releases with the following blanket … Read more

asp.net, url rewrite module and web.config

I was able to get this working in Visual Studio 2010. Start with Ruslan’s post here and download the 2.0 IntelliSense file. Then, just follow the directions he posted previously here. All I ended up doing was running the following command as Ruslan instructs: C:\download_directory\rewrite2_intellisense>cscript UpdateSchemaCache.js As Christoph points out in his comment, make sure … Read more

What is Thread.CurrentPrincipal, and what does it do?

Thread.CurrentPrincipal is the way .NET applications represent the identity of the user or service account running the process. It can hold one or more identities and allows the application to check if the principal is in a role through the IsInRole method. Most authentication libraries in .NET will verify the user’s credentials and set this … Read more

SignalR + Autofac + OWIN: Why doesn’t GlobalHost.ConnectionManager.GetHubContext work?

If you use a custom dependency resolver with SignalR, you can no longer use GlobalHost unless you modify it: GlobalHost.DependencyResolver = new AutofacDependencyResolver(container); IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext<MyHub>(); // A custom HubConfiguration is now unnecessary, since MapSignalR will // use the resolver from GlobalHost by default. app.MapSignalR(); If you don’t want to modify GlobalHost, you will … Read more

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