Monday, May 26, 2014

Hostgator: How to clear the ASP.NET Application Pool from Parallels Panel

If you are using Hostgator Windows Hosting Plan for your ASP.Net websites, you probably have notice that is no easy magic button in the Parallels Panel to refresh the asp.net Application Pool from your website. 

Don't have a hostgator account? you can get one by using this coupon link to claim your hosting under $4.00.

I contact support asking to find a way to do this from Parallels and they told me there is no way to do that. They can reset it for me when I wish to. Well, that doesn't work for me. I am not going to sit and wait 13 min in the chat window to get an agent on the line and ask them to please reset the application pool for my website.

The Workaround:

If you are a developer you probably already know this work around. 
Edit the web.config via the web management panel in Parallels or FTP the updated web.config via the ftp and the application pool should reset automatically. But you don't have experience you can easily do these easy steps from the Hostgator Hosting Panel for Windows.

Follow these Steps:
1) Login to Hostgator Parallels Panel Web Interface
2) Under the Websites & Domains, location your website and find the ASP.NET Settings Link



3) Make a change here that would not harm your website. I usually just change the value of the session timeout (minutes).

4) Save the changes by clicking on the OK button. 



That's IIS will automatically reset the application pool for your website.

Friday, May 16, 2014

Visual Studio Deploying DatabaseProject Error Could not find DATABASE.SQLPERMISSIONS

I had this error today with my vs.net 2010 database project. I hope this simple fix helps you solve your issue.

  Error message: Could not find a part of the path 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 10.0\COMMON7\IDE\PROPERTIES\DATABASE.SQLPERMISSIONS'. C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 10.0\COMMON7\IDE\PROPERTIES\DATABASE.SQLPERMISSIONS

The first thing I did was check the history of the database project and yet there was nothing unusual that had changed. Then I check to see if I actually had that file in the path that it was given and nope I did not had it. Obviously vs.net was looking at the wrong path. The file did existed within the database project path \properties\ folder.

 The answers on stackoverflow.com did not helped me at all.
 Then I remembered about the metadata files so I went into the location of the database project file and removed the *.dbmdl files and the .user files associated to my database project file.

In order to remove those files I had to first unload the db project from visual studio, otherwise you get an error.   That did the trick. Load the project again and I was able to successfully deploy the database project.

Wednesday, March 26, 2014

JSON Webservice Error There was an error processing the request

I was dealing with this error for a couple or more hours with a JSOn Webservice in asp.net when calling from JQuery and Backbone.js client side application. When I was returning a simple entity it was working just fine but when I wanted to return a complex object type it was failing.

Any ways after looking and trying different things I found that the issue was with the max response limit was exceeding. Of course it was hard because there was no detail error log information any where. The webservice class was not throwing any particular exception. IIS was just return the Error 500 with this message.

Message":"There was an error processing the request.","

The FIX:

Simply added this to the web.config where the .ASMX class lives and the problem was solved.


<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="50000000" />
</webServices>
</scripting>
</system.web.extensions>

Tuesday, February 11, 2014

How to remove a TFS Workspace Mapping?

I just encountered this issue after changing the build servers domain names. Clearing the TFS mappings using TFS side kicks did not worked.


Error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets (806): The path c:\builds\bizproj\QA\Sources\Configuration2.0 is already mapped in workspace LOCALBUILD02_72_2;\tfsuser.

Go to the build machines and delete the files under this folder.

C:\Users{UserName}\AppData\Local\Microsoft\Team Foundation\3.0\Cache

After you clear that trigger a new build and see the results.

Friday, January 24, 2014

Windows 7 Device and Printers not loading. Issues with Printer Spooler service.

I started this week experiencing issues with my computer. Some programs starts not working when doing an operating and click on it would read “Not Responding”.  It happened that I needed to print something and I when to Devices and Printers on the control panel and notice that it was not loading. I knew about the Printer Spooler service. So I went ahead and went into services.msc and look for Printer Spooler. It was running and set up as Automatic which is great that’s what we want. 
I right click and restart and immediately the Devices and Printers on the Control panel load up. However, I was not able to print. I tried to read the device and nothing would come up. 

I continue to had this issue for several days. When an application like snag-it or Word or Excel would hang up, I restarted the Printer Spooler and it worked right away. So I thought this freaking Printer Spooler is corrupt. I tried finding help online but no help at all. I end up finding about Restarted the Bluetooth Service. This was not helpful for me at. However, it looks like for several users it did helped. So give that a shot first if your Devices and Printers is now loading in Windows 7 or possible in Windows 8. 
What you want to do is make sure you start up the services:

 1) Bluetooth Service 
 2) Bluetooth Support Service. 

If after your start or restart this services you still have the issue like me, try the following: 

 1. Go to the Start menu and type REGEDIT. Then right-click on REGEDIT and select 'Run as Administrator'. 

 2. Go down to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environment\Windows NT x86\Print Processors Under Print Processors there should be a folder called 'winprint'. If it's there delete and recreate it. if it's not there create it. 

 3. To create the 'winprint' folder and key, right-click on 'Print Processors' and select 'New' - 'Key'. Type in winprint Now, select the new winprint folder and right-click in the black white space to the right where the sub keys should be and select 'New' - 'String Value'. 
Type in Driver for the name. Double click driver and enter in winprint for the value. 

 4. Now try installing the printer. 

I found this from the Microsoft website http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/windows-7-add-printer-does-not-work/f7d4e46e-7f5a-48fa-b8db-d709d57494ac

After doing this I was able to add a new printer and all my printer spooler issuer where gone.