Monday, July 13, 2015

How to get sql server bak file logical name

RESTORE FILELISTONLY 
FROM  DISK = N'path to bak file' 
WITH  FILE = 1 
GO

Use WITH MOVE to identify a valid location for the file.

USE [master]
GO
RESTORE DATABASE [DBName] 
FROM  DISK = N'Path to BAK File' 
WITH  FILE = 1,  
MOVE N'Logical File Name' TO N'New Path to mdf file',  
MOVE N'Logical File Log Name' TO N'New Path to log file',  
NOUNLOAD,  REPLACE,  STATS = 1
GO


To get logical file list

RESTORE FILELISTONLY 
FROM  DISK = N'path to bak file' 
WITH  FILE = 1 
GO

Sunday, June 14, 2015

crystal report for visual studio 2015 / dot net framework 4.6

just copy existing framework folder in aspnet_client\system_web folder and the rename it to 4_81 or whatever version you have installed and your are done
To Check your version click here
http://w3dproblems.dcense.com/2015/09/what-net-version-are-you-running-20-45.html

Sunday, May 24, 2015

Visual Studio 2012, 2013, 2015 and ASP.NET Web Configuration Tool

Run this command in console(cmd)
"C:\Program Files\IIS Express\iisexpress.exe" /path:c:\windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/asp.netwebadminfiles" /port:8089 /clr:4.0 /ntlm
Than open your browser and open this url http://localhost:8089/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=[Exact_Project_Path]\&applicationUrl=/ 
Also make sure you have this connection string in your web.config file
<connectionStrings>
    <clear/>
    <add name="LocalSQLServer" connectionString="......." providerName="System.Data.SqlClient"/>
  </connectionStrings>
<clear> is important