Thursday, March 26, 2015

WCF on IIS 8 Windows Server 2012

Problem
I have a asp.net website that uses WCF to serve up JSON.  Recently this website was to a windows 2012 server.  When this was done, my posts to the WCF service stopped working.

Solution
I had to install features to .Net 4.5 to include HTTP-Activation for WCF Services.  Once I did this my WCF requests worked.

Steps
1. Press Windows + q to search and enter server manager in the search box

2. click on local server 


3. type in .net in roles and features select ASP.Net 4.5 click on add roles and features


4. select the server you want to work with and click next


5. click on features on the left
6. expand the .Net Framework 4.5 Features
7. expand WCF Services
8. Check HTTP Activation
9. click install.



Now your MVC app should work


Wednesday, March 25, 2015

SQL Server Reporting Services (SSRS) and MVC application with reports controller on same server

I ran into this problem recently and it took me a bunch of time to figure this out.

Problem
Getting prompted for a windows userid and password when accessing an MVC Controller action named http:\\mywebsite\reports.

Environment
Windows server 2012
SQL Server 2014 with SSRS
All of these items are on the same server as this was a development server.


Fix
I renamed my SSRS report manager URL to something other than reports.


Explanation
My MVC url http:\\mywebsite\reports was going to the reporting server, not my controller.  By renaming my SSRS report manager URL the names were now different and my problem was solved.


Friday, March 13, 2015

Tail for Notepad++

In notepad++ there is a plugin that lets you monitor logs just like tail.

I have tried it and it works great, much better than waiting for notepad++ to tell you the file is changed and hit refresh.

Here is a nice blog post on how to do this.

The name of the blog is great to.

http://fix.lazyjeff.com/2011/11/how-to-tail-file-in-windows-using.html

Thursday, January 29, 2015

Bring Your Own Device - Run As Domain User

Issue
When I am on client sites I often have a domain account to use, but bring my own device.  When working on SQL servers I have to remote into the server to do any type of SQL queries or database administration.




Solution
I finally came up with a solution for this.  I added this to a power shell script on my desktop and now I can connect to SQL server on the domain.  When I run the powershell script I just add my domain password and I can connect to the server

Thursday, December 11, 2014

SQL Server Stuck in Restoring State

If you database ever gets stuck in restoring state run this script to get it usable again.




RESTORE DATABASE MyDatabaseName WITH RECOVERY

Tuesday, December 9, 2014

What is that website built with?

Wondering what a website is built with?  Is it ASP.Net, Java, PHP?

Built with will tell you

http://builtwith.com/


Tuesday, November 25, 2014

Run as Different User in Windows 8

In previous versions of windows I could do the key combination ctrl+shift+ right mouse click and run an application as a different user.

This can be useful for troubleshooting connectivity issues to servers and applications.

I could not find this in windows 8.

This feature is turned off by default on Windows 8.  Below are the instructions to turn this back on.


  1. Press Win+R, and type"gpedit.msc",then press Enter.
  2. In the left pane, click/tap on to expand User Configuration, Administrative Templates, and open Start Menu and Taskbar.
  3. In the right pane of Start Menu and Taskbar, double click/tap on Show "Run as different user" command on Start.
  4. Select Enabled, click/tap on OK.
  5. Reboot the computer.


The full post can be found here Reference