Accessing SQL Server on Windows Server 2008 R2 from remote client

27. March 2013

This is a nice Blog post for the solution to this problem :- http://stackoverflow.com/questions/5717310/accessing-sql-server-on-windows-server-2008-r2-from-remote-client

The solution which worked for me is :- 

Here is a summary of what worked for me to get remote connections working. I am not an expert in this so some of my steps may not be necessary. I took some of the steps from other answers to this question.

  • Open SQL Server Configuration Manager
  • Select SQL Server Network Configuration
  • Chose your instance of a SQL Server
  • Make sure that TCP/IP protocol is enabled
  • Right click TCP/IP protocol
  • Select properties
  • Click IP addresses tab
  • Scroll down to IP4. The IP address of the server should be here. Set active to yes and enabled to yes. Set TCP port to 1433 (don't know if this is necessary. Can some expert comment)
  • Scroll down to IPAll. Set TCP port to 1433
  • Make an inbound firewall rule for port 1433
  • open sql server management studio, right click server instance, properties->connections-> allow remote connections. Security-> SQL Server and Windows Authentication mode
  • restart sql server service
  • restart sql server browser

MSSQL 2008

Taking over your website server under different Domain name by someone

26. March 2013

Recently i found out that my site was captured under a different domain name . When i was searching for some link in google there was a link which was pointing to my website's page but the domain name was entirely different from mine . I checked in my server that IIS was bound to all HTTP request coming through port 80 to my site hence someone just used my ip address under their domain name and started publishing my site under it . 

 

Solution to this problem is simple, bind your website in IIS to specific domain and never leave domain binding empty else you could also face the same problem .

IIS , ,

How to use default required validators in HTML

21. March 2013

I just got to know something new ( i know its not a very recent thing its just i was unaware of it till date ) that we can use HTML 5 inbuilt validation . You just have to include 'required' word in <input> tag and there will be an automatic validator.

<input name="something" type="text" required />

HTML5 , ,

Updatepanel gives full postback instead of asyncpostback When using Dropdownlist inside listview inside Updatepanel

19. March 2013

Updatepanel gives full postback instead of asyncpostback When using Dropdownlist inside listview inside Updatepanel . This Problem i faced when i had a listview which dynamically gets items and populates itemtemplate with dropdownlists . I had this listview inside an updatepanel and when selectionchanged event fires a complete postback was fired .

Solution to this problem i found out at this link http://stackoverflow.com/questions/4319156/updatepanel-gives-full-postback-instead-of-asyncpostback

OR

you can directly add ClientIDMode="AutoID"in listview

 

 

ASP.NET ,

After logout, back button in browser should not open the secured page visited earlier.

7. March 2013

Solution to this problem is
We have to add these four lines in every page ( which you want to make not cacheable ) . I have added these lines in Masterpage on OnInit() function.

protected override void OnInit(EventArgs e)
{
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetAllowResponseInBrowserHistory(false);
Response.Cache.SetNoStore();
base.OnInit(e);
}

ASP.NET ,

Login failed for user 'IIS APPPOOL Classic .NET AppPool' when trying to connect to a SQL SERVER using Windows Authentication

5. March 2013

The solution i found for this problem is on this blog post .

 

http://stackoverflow.com/questions/4736140/login-failed-for-user-iis-apppool-classic-net-apppool

 

  • Go into IIS Manager
  • On the node with your computer name, select "Application Pools"
  • Click "Classic .NET AppPool" and select "Advanced Settings..."
  • Select "Identity" property and change its value to "LocalSystem"

IIS

Query to verify case sensitive columns in SQL SERVER having Case insensitive Collation

2. March 2013

How to to verify case sensitive columns in SQL SERVER having Case insensitive Collation.

Use this query

SELECT * FROM LoginData WHERE username ='something' AND password COLLATE SQL_Latin1_General_CP1_CS_AS LIKE 'askjashAA';
OR

SELECT * FROM LoginData WHERE username LIKE 'something' AND password COLLATE SQL_Latin1_General_CP1_CS_AS LIKE 'askjashAA';

 

SQL ,

How to disable default click of a hyperlink in html

2. March 2013

How to disable default click of a hyperlink in html

We can use below statement in href of any hyperlink tag .

<a href='javascript:;' >something</a>

Javascript

Suddenly my controls stop working and postback was fired when clicking buttons

1. March 2013

Suddenly my controls stop working and no postback was fired when buttons clicked . This problem occurred because i added  by mistake some html code in my form which included its own form hence my already working controls stopped .

ASP.NET