Thursday, May 5, 2016

Integrating IIS Express with asp.net and connecting to DB

Yesterday I installed asp.net application on my system without installing visual studio and heavy editors.

Actually my purpose was to just run project and redesign the layout for responsive structure.
If you are comfortable with sublimeText or dreamweaver editor and would like to implement a static changes or frontend coding this article will be so helpful.

1. Install IIS Express from https://www.microsoft.com/en-us/download/details.aspx?id=48264 

2. Install SQL Server 2014 from https://www.microsoft.com/en-in/download/details.aspx?id=42299 and while installing remember/note username and password for database connectivity credentials

3. I had a backup file of SQL named sqlbackup.bak

To import .bak file in SQL Server follow below steps:
  • Connect to a server you want to store your DB.
  • Right-click Database.
  • Click Restore.
  • Choose the Device radio button under the source section.
  • Click Add.
  • Navigate to the path where your .bak file is stored, select it and click OK.
  • Enter the destination of your DB.
  • Enter the name by which you want to store your DB
4. After IIS Express is installed add your  asp.net files into Documents/My Websites/Website1/ folder
5. Open SQL Server 2014 Configuration Manager and Open
SQL Server Network Configuration -> Protocols for MSSQLServer : Enable Named Pipes and TCP/IP and restart sql server
6. Add connection string to web.config file.

Now after installing and configuring:
Open http://localhost:8080/myproject/ and done !!!

If you want to change css/html code can use any editor save and it just works great.







No comments:

Post a Comment