SQL Server screwups and how to fix them.

So recently I installed Visual Studio 2017 on a laptop and I installed it with only the ASP.NET and WinForms features. I was working on a webapp and initializing the database when I realized that VS was completely unable to connect to the database. I opened the “SQL Server Object Explorer” and tried to manually connect to the MSSQLLocalDB instance and I got this error.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 – Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.) (Microsoft SQL Server)

I tried to start the service from the CMD and I kept on getting similar errors. Eventually, I concluded that the installation was corrupted and therefore tried reinstalling LocalDB. Guess what? It got me past this error but introduced me to another. It was something like this.

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file ‘c:\Users\AnasDatabaseName-asdf5sdfasd5fs5dfs5f.mdf’.

This time, the CREATE Database command was failing because it was trying to create and MDF file in my “Users” folder. I checked the default location for the databases and it was in a sub-sub-sub-sub-folder inside AppData. A bit of Googling told me that this was actually a bug in the program itself and had been fixed in a recent update. So I just downloaded the latest Cumulative Update from the Microsoft site and it did the trick.

 

From Windows 8 to 10 – The excitements and the disappointments.

tl;dr
I have been a Linux user for the past few years, but I grew up using Windows, and I have always been closely interested in it’s progress and moves.
When Windows 8 came out, I was like the only person I knew who didn’t hate the Metro. All my friends thought it was ridiculous, and truth be told, it was. It seemed as if they had forgotten that people neither have a bunch of huge touchscreens lying around in their place nor do they love the desktop experience in full touch, and Windows 8 was a weird cross between an OS optimized for touchscreen, and an OS that didn’t look like it would ever work well with touchscreens.
Accessing the desktop by clicking on a tile at the bottom left corner of the screen was oddly disturbing.. it felt like the desktop had lost it’s old integrity.. Like it was only a tile among many, like it was just another app like the ones accessed by clicking the other tiles. Furthermore, at times, it was hard to decide which world to live in: the metro, that had a really long way to go, and was far from mature, or the desktop that we’d both loved and hated for ages. For Developers, it both sucked and was an opportunity at the same time. They had a new platform to master; some would go on to proudly declare themselves to be of the first 100 developers for Windows apps. Some developers saw it as mere clutter. Another language and platform to come across and not-read articles of.
The question was: “Why?”
… 

 

Connect to the Internet via a Network Bridge [Windows]

You’ve got 2 computers at your place. A nice laptop, and a desktop that’s deprived of a wireless adapter. The laptop connects to the internet through the router, to which it wirelessly connects, however the PC has to do without internet since the router’s a bit too far away from the computer for a wired connection. 
In such a case, you might wanna consider (or might already have unknowingly) going for a network bridge. The idea is that you connect your computer to the laptop via an ethernet cable,  and the laptop to the router (WiFi). So in simple terms, you are connecting to the internet through the laptop which is connected to the internet.
But it’s not as simple as simply plugging in a cable. Some configurations have to be made, so here’s what you can do:
Open the “Network and Sharing Center” on your Laptop, and click on the “Change Adapter Settings” link. Select/Highlight both the Wireless and the Ethernet adapter, right-click, and click on “Bridge Connections.”
Now sit back and relax while Windows sets up the bridge and once done, check if another icon appeared among the adapters, representing the “Bridge.” Also, you might wanna check if both the two adapters are part of the Bridge. It’s pretty simple and all you gotta do is see whether or not it says ‘bridged’  next to enabled on the adapters’ icons. If either of them doesnt, right-click and select “Add to Bridge.”
Before you proceed, on your laptop, fire up CMD, and type in “ipconfig /all”, Note down the values it returns for “IPv4 address”, “Default Gateway”, “Subnet Mask” and “DNS Server.”
Now the Client-side configuration. On the other computer, go to the Ethernet Adapter’s IPv4 properties; check “Use the Following IP address.” Fill in the ‘Subnet Mask’, ‘Default Gateway’, and ‘DNS Server’ fields with the values you previously copied after running the ipconfig command on your laptop. However, in the IP Address field, add 1 to the last three digits, so that e.g. 168 becomes 169. As for the ‘Alternate DNS Server’ field, add 1 to the last digit just like you did for the IP Address. That’s it; check “Validate Settings upon exit”, click “ok”,”ok”,”close.”  After a few seconds, the other computer would be connected to the internet.

 

How to Assign a Static IP to on Windows Computer

A Static IP differs from a Dynamic one in the sense that the latter changes with every router reset, while the former always stays the same.
To change your IP to a dynamic one, follow these steps:

  1. Fire up CMD, and type in “ipconfig /all”
  2. Note down the values it returns for “IPv4 address”, “Default Gateway”, “Subnet Mask” and “DNS Server.”
  3. Open Network and Sharing Center (quickest and simplest way is to right-click the network icon in the system-tray and clicking on the link therein.)
  4. In the sidebar on the left, click on the ‘change adapter settings’ link.
  5. Double-click on the icon of whatever adapter you are connecting to the internet through.
  6. A window would pop-up. Right in the centre of the box, would be a list of items that the connection makes use of. Look for “Internet Protocol Version 4(IPv4)” in the list; select it; click properties.
  7. Another box would pop-up, but this one’s the last in the row. Now this step is where you make the real changes, but before you change anything, check if the “Use the following IP address” radio button is already checked, and if it is, quit straight away since it’s already static. However if not, then do check it.
  8. At least three of the previously disabled input fields would now be enabled. Fill the fields with the details you copied from the results to the ipconfig command. The last bit of the IP Address is variable and you can give it any value you wish, however, copying the existing would do the trick too.

That’s it you are done.

 

Creating a Counter-Strike Server using Port Forwarding and the dedicated-server application

First off, to create a server, you need additional files. The main executable of them being the “hlds.exe”, and if this one’s present, we must assume that the other prerequisites are present too, (including swds.dll, which is like a patch that allows non-steam clients.) If not present, just search for them, and download them.
Creating a server on a machine is no big deal. All you have to do is run the HLDS, and fill in the slots with whatever you wish, (who am I to limit the max no. of players on your server?) and I assure you that the slot for Server Name can carry anything. However, in the “UDP Port” slot, type “27015” since it’s the preferred (actually most-widely-used) port for CS. The Server’s up the moment you click But the thing is that the server’s local. It’s accessible only on your PC and on other computers on the same network, but not globally accessible over the internet. So how do we make it global?
That’s what we forward the ports for. To do so, login to your router, by typing the router’s IP address into the browser. TP-LINK users may consider this a complete step-by-step guide, though of course this applies to all, however different ones have slightly different UIs.
Anyways, once logged in, goto Forwarding and then to Virtual Servers, and click on . A form should greet you. Now in the Service port slot, type “27015”, (if there’s an “internal port” slot, leave it blank.) The rest can be left to the defaults, however in the IP Address Slot, type in your computer’s ipv4 address, and it should be static (unless you are looking forward to having to go through the whole damn procedure again and again.)
After inputting the IP, save the changes and now you are good to go.
Now others can connect to your server by typing into their CS consoles:

connect xxx.xxx.xxx.xxx:27015

(Replace ‘xxx.xxx.xxx.xxx’ with your router’s global IP address. To find out the global IP, the quickest and easiest way is to visit whatsmyip.org.)

 

ChromeOS ported to Windows 8

Got the update?
asdaf
Yes this is the latest version of Google Chrome running in Metro on Windows 8.1 preview. It’s like the whole of ChromeOS is being simulated in an app, (and that is the whole idea behind it.)
Strange yet smart move; let’s see if either this or the launchers can get people to use and actually get comfortable with the Chrome Apps environment..
#SkyNet…

 

Chromecast

Came across the term for the first time when I was checking out stuff on the play Store. It’s another project by Google, which in itself is naught but like a USB flash drive, but there’s more to it.
The Chromecast enables you to enjoy media content on your HDTV. Means if for example you come across a YouTube Video, while checking out your Facebook feeds, all you have to do is look for and press the chromecast button. It would prompt you with a list of available devices, selecting any of which would play the content on whatever device you chose. To do so, what you are gonna need is true chromecast USB device of course which has to be plugged into the TV.
Here, a link to the official video:
The Chromecast

 

Microsoft Surface 2 and Surface Pro 2

Couple of days back, Microsoft announced the ‘coming’ of the new Microsoft Surface 2 and the Surface Pro 2; the former being the successor to Surface RT, while the latter of course succeeds the Surface Pro.
So, what else did Microsoft say about the two? and what new features do they pack?
First off, to the new and similar ‘features’. Both of them now come with a, what they call, “dual-angle Kickstand” , that can be adjusted to meet your requirements, so called improvements in battery life, ‘faster’ ‘than ever before,’  HD Screens, and support for USB 3.0. With both, you get about 200GB on SkyDrive free for 2 years, along with an year of ‘unlimited free voice calling to landlines in over 60 countries’, and ‘free Skype Wi-Fi at over 2 million hotspots worldwide.’
Now to the DIfferences.
The Surface 2 comes pre-installed with Windows RT, and touch optimized Office RT, to which, the addition of Outlook has been made. Battery life of about 10 hours, and the NVIDIA Tegra 4 processor ensure that you work ‘faster’ and ‘longer’ 😛
The Pro 2 would come with Windows 8.1, packs an Intel Core i5 Processor, and about 512GB of Storage. They also say that they’ve ‘taken advantage of the latest processor technology to provide longer battery life on a single charge.’ Apart from that, it has its own stylus i.e. the Pro Pen, and a ‘ brilliant 1080p widescreen display.’
Accessories include a Docking Station, Wireless adapter for type-covers, the touch/type-covers of course, and the Surface Music Kit (similar to the covers), an Arc Touch Mouse, and a car charger.

 

Cloud Services – Quick Reviews

With the passage of time, as ‘everything is moving to the cloud’ (pardon my excessive use of this quote, but it does really sum things up), the use of cloud storage is becoming common, and there are dozens of such services on the cloud each with its own uniquity, now the questions that arise are, “which one of them is the best?” “which one should i go for?” “can we really trust them with our data?” e.t.c. So, in this post, I’m going to talk a bit about the most popular (or at least the ones i prefer) cloud services on the web.
Microsoft’s Skydrive(formerly Windows Live Folders): Microsoft’s own cloud, that offers about 7GB of free storage. Apps are available for Windows, MacOSX and Mobile Devices i.e. Android and iOS. These apps are well integrated once you fully install them and do offer a Sync feature, but the best thing about SkyDrive is that it serves well as both: “access-through-browser” service and when installed, it can sync files between your PC and SkyDrive very well too. The Web Interface is what most people love about Skydrive, and you can also create and to some extent, edit documents e.t.c. It has this own great photo viewer, e.t.c. So on the whole, Skydrive isn’t too bad.
Google Drive: Taking into account the factors stated in the description of skydrive, Google Drive is perhaps the only other such service that’s in any way close to Skydrive. Google however offers 15GB, and, the photos and documents don’t take up storage space on the google drive, so it doesn’t really matter, and in fact, the later feature is good. About the Document thing, they can be created through Google Docs. Interface is good and clean and it too offers applications so that you can sync between PC and Drive.
Ubuntu One: Ubuntu One, my favorite, unlike the above two, has apps for all three platforms, offers 5GB of Storage and has an awesome Sync. Despite how lame the phrase ‘awesome Sync’ sounds, i really mean it. I never really could ever make efficient use of cloud services until i tried Ubuntu One. Google Drive can be troublesome when installing and Skydrive’s Sync features were kinda limited to special folders back then, and neither offered the speed and everything that Ubuntu One did. It merely flows, but the major drawback about it is that the Web interface doesn’t really go beyond listing the files and offering a few basic features like ‘delete’ and ‘download.’ And you might find that it doesn’t run as smooth on Windows as it does on Ubuntu itself, but then that’s what it was made for.
Bitcasa: Bitcasa offers about 10GB of free storage, and has a nice and clean interface. It too offers applications for Windows, Mac, and phones, but my usage of Bitcasa never went beyond creating and account and installing its chrome extension. I never really tried its apps so i cant say much about it. However I created the account in order to use it like a DropBox, where i can throw files when i have to. However what I liked about BitCasa was it’s Chrome Extension that allowed you to directly download stuff to your bitcasa drive, and thus beside ever download button is a ‘download to bitcasa’ button.
Flickr: Flickr is a photosharing website, backed by Yahoo, which, according to what it says on its home, offers about 1TB of free storage space, which you might not ever run out of. So if you have to store huge masses of pictures. Go for Flickr.
CloudApp: CloudApp is the best cloud service that exists. It’s quick and amazingly user-friendly, but it’s only available for MacOSX.
These  were the cloud services I normally use and prefer. As for the Question about ‘trust’, well, all i can say is that Microsoft are what brought computers to us, and thus have been in the game for ages. So i doubt that they care about what a single user from millions in his 196th country is storing on their servers, and as for Google, well, you trust google with quite a lot already + u use their email services. Clouds like bitcasa can be a problem, as even I didn’t really hear anything about it. I just came across it somewhere and liked it; tried it. Flickr’s Yahoo’s.