Igor Kitsula .NET Developer

A Web Programmer Reference

 

How to create custom user login for Azure SQL Database

When I was trying to create second Azure SQL database on the same shared SQL Server I stuck for a few minutes with a problem that Azure didn’t allow me to create new user (credentials) for this new DB. It turns out that Azure UI does not allow creating users for different databases on the same server.

However, it is logically to have separate credentials for apps per database. Fortunately, we can create users and logins with T-SQL. Here is solution.

Read more...Read more...

Using SQL Server for ASP .NET session state on hosting service provider

Can be several reasons why to use SQL Server for session state. In my case hosting service provider does not allow me to control application pool so user losing his session state from time to time and it’s very big issue. There are a lot of articles in Internet how to setup database to store ASP.NET session state, but no one explains how to setup it on a remote SQL Server database where you have no ‘sa’ rights. The problem with a standard InstallSqlState.sql script is that it tries to create SQL server job for cleaning up database from expired sessions.

Read more...Read more...

MVC Custom Error Pages (Log to database with Log4Net and notify by email)

MVC Custom error pages (log to database with Log4Net and notify by email)
There is a lot articles in web how to create and use custom error pages. I tried to implement one more solution and give you my example how to handle and log errors on website using Log4Net library and notify about error by email.

Read more...Read more...